Showing results for 
Search instead for 
Did you mean: 

Issues building a query passing A parameter syntax

New Contributor

I know this is a very simple solution however I connect figure out the syntax in SL. I can pass this in a stored procedure on redship but when building it in my Pipeline using the Redshift execute it will not work and getting syntax error

It appears that it is trying to put the first part of the email as a column

Simple SQL

Select * from Snaplogic_space.SFDC_Leads_vw where = ‘’

Snaplogic SQL pass Value form email above to a parameter
FROM Snaplogic_space.SFDC_Leads_vw
WHERE ==” + $Email + “”

Where $Email has a value of

Syntax Error
Redshift - Execute1
SQL statement*=
FROM Snaplogic_space.SFDC_Leads_vw
WHERE =” + $Email +“”
Pass through
Ignore empty result
Auto commit
Execute during preview
Failure: Failed to execute query: SELECT * FROM Snaplogic_space.SFDC_Leads_vw WHERE, Reason: Amazon Invalid operation: column “phubley” does not exist in sfdc_leads_vw;, Resolution: Please check sql query.

this seems so simple cannot figure out what I am doing wrong


New Contributor

I figured it out

FROM Snaplogic_space.SFDC_Leads_vw
WHERE email ='” + $Email + “'”

If anyone was wondering. Just tired and forgot the single " ’ "

Former Employee

You should not have to make the SQL statement an expression in the snap, the following should directly work:

SELECT * FROM Snaplogic_space.SFDC_Leads_vw WHERE = $Email

The snap will turn any property references (e.g. $Email) in the statement into a bound parameter when preparing the SQL statement.

New Contributor

Thank you very much that worked perfect