Vendor neutral SQL

Posted by Sparafusile on Stack Overflow See other posts from Stack Overflow or by Sparafusile
Published on 2010-04-15T14:38:17Z Indexed on 2010/04/15 15:03 UTC
Read the original article Hit count: 270

Filed under:
|

I'm currently working on a project for a web application that may be installed on several different servers with various software configurations. I want to make my application as flexible as possible by allowing the user to have various SQL servers installed. The problem is the SQL syntax used by any two server vendors does not match up. For a simple example, here is the same SELECT statement for MS SQL and MySQL:

MS SQL - SELECT TOP 1 * FROM MyTable ORDER BY DateCreated DESC

MySQL - SELECT * FROM MyTable ORDER BY DateCreated DESC LIMIT 1

Are there any standard way to abstract the statement creation for various vendors? Any online resources or books discussing this problem? Any hints or smart-alec remarks that I'd find useful?

Further information: I'm writing my we application in vanilla ASP running on a Windows server.

Thanks, Spara

© Stack Overflow or respective owner

Related posts about vendor-neutrality

Related posts about sql