rickgaribay.net

Space shuttles aren't built for rocket scientists, they're built for astronauts. The goal isn't the ship, its the moon.
posts - 303, comments - 180, trackbacks - 35

My Links

News

Where's Rick?


AgileAlliance deliver:Agile 2019- 4/29
Desert Code Camp, PHX - 10/11
VS Live Austin, TX - 6/3
VS Live SF - 6/17


About Me
Hands on leader, developer, architect specializing in the design and delivery of distributed systems in lean, agile environments with an emphasis in continuous improvement across people, process and technology. Speaker and published author with 18 years' experience leading the delivery of large and/or complex, high-impact distributed solutions in Retail, Intelligent Transportation, and Gaming & Hospitality.

I'm currently a Principal Engineer at Amazon, within the North America Consumer organization leading our global listings strategy that enable bulk and non-bulk listing experiences for our WW Selling Partners via apps, devices and APIs.

Full bio

Note: All postings on this site are my own and don’t necessarily represent the views of my employer.



Check out my publications on Amazon Kindle!





Archives

Post Categories

Published Works

Writing Vendor Neutral SQL

I have been reading up on T-SQL (SQL Server) vs P/L-SQL (Oracle) and discovered a handy flag that can be used in SQL Server to ensure FIPS 127-2 (SQL-92/ANSI-92) compliance.
 
As far as I know, both SQL Server and Oracle only guarantee entry level FIPS 127-2 compliance. Therefore, one of the ways to ensure that your SQL syntax is portable is by keeping your syntax FIPS 127-2 entry-level compliant.
 
To do so, consider using the SET FIPS_FLAGGER directive when prototyping your queries (BOL reference: http://msdn2.microsoft.com/en-us/library/ms189781.aspx).
 
For example, setting the flagger to "Entry" reveals that the following syntax is SQL-92 compliant:
 
SET FIPS_FLAGGER 'ENTRY'

SELECT Status

FROM

TABLE1

UNION

SELECT Status

FROM

TABLE2

---

RESULTS

FIPS Warning: Line 1 has the non-ANSI statement 'SET'.

FIPS Warning: The length of identifier 'CONTAINER_STATUS_VIEW' exceeds 18.

(7 row(s) affected)

Note that the FIPS compliance parser also looks at field name size constraints, so you will get warnings similar to above as well. I believe most of these can safely be ignored as there is a fair overlap between vendors, but the main focus should be the syntax.
 
If anyone has any other tips for writing vendor neutral SQL, I would be very interested.

Print | posted on Monday, March 05, 2007 12:09 PM | Filed Under [ Misc. ]

Comments have been closed on this topic.

Powered by: