Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of ADO SQL syntax differences between Jet MS Access and SQL Server

I currently use SQL via ADO 2.8 (with Delphi) with Access databases, and sometimes with SQL Server 2005. But the syntaxes are not the same for the 2 databases. Is there, somewhere, a list of the differences in order to adapt the queries for the 2 databases ? Convert Microsoft Access (JET SQL) to SQL Server (T-SQL) but it seems not to be up to date.
Remark: I don't use existing databases; I create them with ADO.
Informations with some 'edits' help : 1/ My goal is to have only one Query for Access & MS SQL and to translate the query depending on the choosen database. For it I need to know what is the best syntax for my query and how (and if I have to) to translate when I change my database.

Example : for the datetime : Access : SELECT * FROM MYTABLE WHERE SomeDate = #1/1/2005#
T-SQL: SELECT * FROM MYTABLE WHERE SomeDate = '1/1/2005'

But I found some informations where you may use for both : SELECT * FROM MYTABLE WHERE SomeDate = #2011-02-22 00.00.00#

like image 963
philnext Avatar asked Jun 07 '26 12:06

philnext


1 Answers

If your interest is DDL queries for Access (Jet/ACE) and SQL Server, see this table of data types on MSDN: Equivalent ANSI SQL Data Types

like image 94
HansUp Avatar answered Jun 09 '26 03:06

HansUp