Sunday, May 15, 2005

ANSI SQL-92 Compatibility

ANSI SQL-92 Compatibility: "ANSI SQL-92 Compatibility

I have been doing some testing of Sybase T-SQL code that could quite easily be migrated to Microsoft SQL Server. Of course, the horrible *=, =* join syntax is still used, among other things.

How can you decide if the code that is there is really appropriate?

One was is to enforce ANSI SQL-92 standards. Well, each DB vendor implements ANSI SQL-92, on their own terms. SQL Server supports functionality that Oracle or Sybase decided to leave out, and visa versa. Fun.

Well, for SQL Server, to test if the code is actually compatible to Microsoft's subset of ANSI SQL-92, there is a SET option to warn you.

SET FIPS_FLAGGER

Great name, but FIPS (Federal Information Processing Standard) 127-2, the standard for computer systems purchased by the United States government, is what Microsoft has decided to enforce. FIPS 127-2 is based on ANSI SQL-92. So we have a Standard, based on a Standard, based on a Standard.

Books online has a bit of information on this SET option, but there is nothing that says exactly was is expected in each level. I guess, if you want to be sure the code will work reasonably well across DB vendors, Full is your only option.

SET FIPS_FLAGGER 'FULL' really takes your code and tells you that it is crap. Don't look at the output if you are having a bad day.

ANSI SQL-99.....well, that is finding it's way into SQL Server 2005 and I am not picking on that yet."

0 Comments:

Post a Comment

<< Home