I’m trying to run this statement (SELECT TOP 1 SKIP 10 FROM x) but it fails, why?
I’m guessing you’re used to Informix or Firebird SQL. You can’t run that statement in SQL Server because the syntax is not supported as part of SQL Server’s T-SQL language.
Trying to port SQL code between database systems is always challenging. There are ANSI standards in place to safeguard against this, but every subsequent release of the big vendors’ database systems makes it less and less appealing for DBAs and developers to jump through the necessary hoops. Why write my own PIVOT code when I can simply use the SQL Server command?
There are a number of comparison websites on the Internet that help compare basic language elements between database systems. I’ve found that this aptly named website, Comparison of different SQL implementations, helped the developers in my office work through many of their issues. Give it a try!