Skip to content

Migrate sql queries from sqlserver to LabKey SQL syntax - #1854

Open
ankurjuneja wants to merge 18 commits into
release26.3-SNAPSHOTfrom
26.3_fb_migrateSQLQueries
Open

Migrate sql queries from sqlserver to LabKey SQL syntax#1854
ankurjuneja wants to merge 18 commits into
release26.3-SNAPSHOTfrom
26.3_fb_migrateSQLQueries

Conversation

@ankurjuneja

@ankurjuneja ankurjuneja commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Rationale

These queries were written against SQL Server and rely on behaviour PostgreSQL doesn't share i.e. implicit type coercion, case-insensitive collation, and T-SQL-only functions. This migrates them to portable LabKey SQL (explicit casts, typed NULLs in UNION branches, LOWER() on both sides of case-sensitive comparisons, chr()/LOCATE in place of T-SQL equivalents) so the ONPRC modules behave identically on both databases.

Related Pull Requests

Changes

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation
  • Verify Fix

@github-actions

Copy link
Copy Markdown

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

@ankurjuneja ankurjuneja changed the title 26.3 fb migrate sql queries Migrate sql queries from sqlserver to LabKey SQL syntax Aug 24, 2026
@ankurjuneja
ankurjuneja marked this pull request as ready for review August 24, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant