Reputation: 509
I am migrating a database from MS SQL Server 2008 to MS SQL Server 2012. I heard that the TRANSACT SQL statements in the 2012 version expects a semicolon at the end of every statement. Since it is not possible to modify every sql file one by one, is there any parsers or add ons available to rectify this?
Please let me know if any other options are available for this requirement.
Upvotes: 0
Views: 1488
Reputation: 2254
the semicolon it is a 'suggestion' related to standard SQL language; the standard SQL language says that you should terminate the statements with a semicolon.
this is true for 2008 and 2008R2 also: you should terminate statements (should you will to write standard compliant statements) and you can do so if you chose to.
it was not mandatory and it is still not mandatory; you can terminate with a semicolon as SQL standard suggest but it is your choice.
there is some exception like the CTE statement or the merge statement; the termination of almost all other statemens is optional.
don't start to work just because 'i heard that...'.
Upvotes: 1
Reputation: 1669
According to Deprecated Database Engine Features in SQL Server 2014, the mandating of semicolons is deferred to a future version of SQL Server, as yet unnamed.
I honestly can't see them ever actually pulling the trigger on this one, precisely for the reason you have encountered. The non-use of the semicolon is just too ingrained and would be an absolute deal-breaker.
Upvotes: 1