sql - Disable SQLCMD Syntax Check -


We sometimes write dataport scripts that change tables or columns names and there are other complex arguments. We also have SQL in the IF statement while referencing those old columns or tables. We have a standard for using an IF statement to make our SQL script multi run friendly.

However, even if the statement assumes the wrong, lipat code in block errors, I'm guessing because a syntax is examined.

  If start with 1 = 0 mydatabase.dbo.mytable *; - does not execute, but there are still errors because the end is not present  

Another strange thing is that it is not always consistent, sometimes it works fine.

Do anyone know that in a way I can disable this type of investigation on the script on a script basis.

Note

I know that people are going to say that they tried a similar situation and this There is no error for me before, it was not an error in the SSMS but it used to work in SQLCMD.

  sqlcmd MyTestScript.sql -r 1-U user-p password  

Then I enter SSM in SSCMD mode Question -> CMDMODED and it still Do not give an error, and after the re-error, the error started in both.

Try to use trial cache blocks, easy to use and elegant.

If starting 1 = 0
- select * from mydatabase.dbo.mytable - try - catches - panic handle code - select ERROR_MESSAGE ()
End Catch


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -