Skip to content

Commit

Permalink
sql fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximMoinat committed Dec 21, 2023
1 parent efd4691 commit a2fa77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/sql/sql_server/field_plausible_after_birth.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FROM
JOIN @cohortDatabaseSchema.@cohortTableName c ON cdmTable.person_id = c.subject_id
AND c.COHORT_DEFINITION_ID = @cohortDefinitionId
}
JOIN @cdmDatabaseSchema.person p ON cdmTable.person_id = de.person_id
JOIN @cdmDatabaseSchema.person p ON cdmTable.person_id = p.person_id
WHERE CAST(cdmTable.@cdmFieldName AS DATE) < COALESCE(
p.birth_datetime,
CAST(CONCAT(
Expand Down
2 changes: 1 addition & 1 deletion inst/sql/sql_server/field_plausible_start_before_end.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FROM
JOIN @cohortDatabaseSchema.@cohortTableName c ON cdmTable.person_id = c.subject_id
AND c.cohort_definition_id = @cohortDefinitionId
}
WHERE CAST(cdmTable.@cdmFieldName AS DATE) > CAST(cdmTable.@plausibleTemporalAfterFieldName AS DATE)
WHERE CAST(cdmTable.@cdmFieldName AS DATE) > CAST(cdmTable.@plausibleStartBeforeEndFieldName AS DATE)
/*violatedRowsEnd*/
) violated_rows
) violated_row_count,
Expand Down

0 comments on commit a2fa77d

Please sign in to comment.