SQL Server ':setvar' Error

Posted by Randy Minder on Stack Overflow See other posts from Stack Overflow or by Randy Minder
Published on 2010-04-21T17:07:34Z Indexed on 2010/04/21 17:13 UTC
Read the original article Hit count: 457

Filed under:
|
|

I am trying to create some script variables in T-SQL as follows:

    /*
    Deployment script for MesProduction_Preloaded_KLM_MesSap
    */

    GO
    SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;

    SET NUMERIC_ROUNDABORT OFF;


    GO
    :setvar DatabaseName "MesProduction_Preloaded_KLM_MesSap"

However, when I run this, I get an error stating 'Incorrect syntax near ':'. What am I doing wrong?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server