OHDSI Home | Forums | Wiki | Github

The use of "timestamp" in SQL Server is different from its in PostgreSQL


(libeiwu) #1

n some tables in OMOP CDM PostgreSQL ddl.txt, two timestamps appear simultaneously, such as both visit_start_datetime and visit_end_datetime are timestamp. But only one timestamp can be used in each table in SQL Server. Can this be modified?

(Clair Blacketer) #2

Hi @libeiwu I would recommend using the sql server ddl instead as it uses the datetime2 format instead of timestamp.

(libeiwu) #3

Thank you very much! Are there any difference else between the two version?

(Anna Karenina) #4

Hello @libeiwu,

The SQL dialects are different in details (datatypes, keywords, function names), so if you’re using SQL Server, you’d probably want to use the scripts from the corresponding directory in the repo.

(libeiwu) #5

Thanks a lot!