cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Server - Execute Snap

sdoscher
New Contributor III

A statement like this works fine in SQL Server. How can I get something like this to work in the SQL Server - Execute Snap? There has to be a syntax issue that I have. Any help is appreciated.

DECLARE @sql AS varchar(max) = ‘This is a Test’
PRINT @sql

13 REPLIES 13

Hi @sdoscher ,

I’m using version main12833. I’ve tried with version main11181 and I got this output:
image
What is your output?

Maybe the Snap Pack version has to do something with it, change it to the latest main12833 and try again.

BR,
Marjan

There is a change of behaviour w.r.t Execute Snap is all dbs. Till 4.26, the Declare query always gives output containing “message” and “status”, and ignores the result set if any.

In 4.27, we prefer result set. If a result set exists then its displayed. If no result set then we simply display {message=success} output. HTH

sdoscher
New Contributor III

Hi @smudassir Yes. That correlates to the EXACT issue I am seeing…can 4.27 be upgraded “independently” or does it have to be part of updating the entire SQL Server SnapPack? We are currently running SQL Server main11181, but I know that is not the latest.

May I know what issue you are facing with the 4.27 version?

sdoscher
New Contributor III

Hi @smudassir I am getting this output
image
How do I tell if I have 4.26 or 4.27?
From your previous feedback, it is almost certain that I do not have 4.27. For the SQL Server SnapPack, we have main11181. Does that mean I have 4.26?