Skip to content

Fix cost account ETL view returning multiple rows per charge id when a charge id has multiple species#914

Merged
jallentxbiomed merged 2 commits intorelease25.7-SNAPSHOTfrom
25.7_fb_fixChargeAccountsViewReturningDuplicates
May 6, 2026
Merged

Fix cost account ETL view returning multiple rows per charge id when a charge id has multiple species#914
jallentxbiomed merged 2 commits intorelease25.7-SNAPSHOTfrom
25.7_fb_fixChargeAccountsViewReturningDuplicates

Conversation

@jallentxbiomed
Copy link
Copy Markdown
Collaborator

No description provided.

@jallentxbiomed jallentxbiomed self-assigned this Apr 23, 2026
WHERE vcs2.charge_id = ca.charge_id
) vcs
LEFT OUTER JOIN dbo.prd_cost_account AS pca on pca.account_id = ca.account_id

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SELECT TOP 1 without ORDER BY is non-deterministic — SQL Server may return a different species row across runs depending on the query plan. Please add ORDER BY vcs2.arc_species_code will guarantee consistent ETL output

@jallentxbiomed jallentxbiomed merged commit 9267320 into release25.7-SNAPSHOT May 6, 2026
7 checks passed
@jallentxbiomed jallentxbiomed deleted the 25.7_fb_fixChargeAccountsViewReturningDuplicates branch May 6, 2026 14:13
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.

2 participants