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?