Home Forums Programming Testing T-SQL - Testing for specific versions of SQL Server RE: T-SQL - Testing for specific versions of SQL Server

  • Thanks very much, downloaded it and run it against a test database. 

    One thing I am a little confused around, if you can shed any light that'd be appreciated.

    Looking at this list:

    https://msdn.microsoft.com/en-us/library/ms143729.aspx

    A deprecated feature appears to be:                       

    A string enclosed in quotation marks used as a column alias for an expression in a SELECT list:

    'string_alias' = expression

    But if I write a stored proc:


    USE [Test_Database3]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[spCompatibilityTest]
    AS
    BEGIN
        SELECT 'Date' = GETDATE();
    END

    The data migration assistant doesn't pick it up as a potential issue, when the target version is set to 2016, on a 2008 database. Do you know how the deprecated features are managed? As another is:

    Not ending Transact-SQL statements with a semicolon.

    And I know there will be shed loads of code which isn't terminated with a ;

    Thanks again for you assitance, appreciate it.