Can I use variables in the 'sql after' tab of MS SQL writer?

More
3 years 7 months ago - 3 years 7 months ago #19756 by JohnIngles
Say if I set variable <FileDate> = 2020-02-28, can I then use it in the "SQL After"

UPDATE table1
SET table1.[End_Date]=<FileDate>
from table1 atr
left outer join table2 tmp
on atr.URN = tmp.URN
where tmp.URN is NULL;
Last edit: 3 years 7 months ago by JohnIngles.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #19757 by Peter.Jonson
That should work.
Remember all variables are strings so put them in quotes when necessary

Peter Jonson
ETL Developer

Please Log in or Create an account to join the conversation.