Created
June 1, 2022 00:13
-
-
Save demarchenac/cddd3cab8f1938173042106a6323ebd1 to your computer and use it in GitHub Desktop.
A simple SQL to reset a cohort table on a given schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS @cdm_database_schema.@cohort_table; | |
CREATE TABLE IF NOT EXISTS @cdm_database_schema.@cohort_table ( | |
"cohort_definition_id" integer NOT NULL, | |
"subject_id" integer NOT NULL, | |
"cohort_start_date" date NOT NULL, | |
"cohort_end_date" date NOT NULL | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment