cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use Dynamic SQL in SnapLogic?

sdoscher
New Contributor III

I have a DYNAMIC SQL that I run in SQL Server Query and it runs fine. I am having trouble running the same SQL in the SQL Server - Execute snap.

Can someone guide me on what I might need to do to get dynamic SQL running in SnapLogic.

This is the message that SL produces after running the dynamic sql query.
image

Thank you.
Scott

1 REPLY 1

sdoscher
New Contributor III

I cannot get this dynamic SQL query to work.
DECLARE @sql AS varchar(max)
SET @sql = ’
select top 10 * from db1.dbo.hc_table

EXEC (@sql)

It runs fine in SSMS, but not Snaplogic.

Is there special syntax that I need to use in Execute Snap?