Salesforce Marketing Cloud queries do not allow variables or temporary tables according to the "SQL Support" section of this official documentation (http://help.marketingcloud.com/en/documentation/exacttarget/interactions/activities/query_activity/)
I have a data extension called Parameters_DE with fields Name and Value that stores constant values. I need to refer to this DE in queries.
Using transact-SQL, an example is:
DECLARE @number INT SET @number = (SELECT Value FROM Parameters_DE WHERE Name='LIMIT') SELECT * FROM Products_DE JOIN Expiry_DE ON dateadd(day, @number, getdate()) < Expiry_DE.Best_Before
Is it possible to get the value for @number from Parameters_DE and use it in the dateadd() function without using temporary tables or variables?