Skip to Content
0
Former Member
Nov 22, 2017 at 06:22 PM

Data Services SQL Transform Syntax error

317 Views

I am more familiar with SQL & new to Data services. I need to write the following in Data Services but get syntax error. Hoping you can help. I have checked other questions and attempted to correct syntax, but need assistance please.

<sql('AnalyticsDB', "SELECT HOUSEHOLD.BUYERNBR,
HOUSEHOLD.EVENTYYMMDD, HOUSEHOLD.HH,
HOUSEHOLD.TRANSDATE, HOUSEHOLD.HHID
FROM HOUSEHOLD WHERE HOUSEHOLD.BUYERNBR IN
(SELECT HOUSEHOLD.BUYERNBR FROM HOUSEHOLD
WHERE '20' + HOUSEHOLD.EVENTYYMMDD > [@g_Max_Date])")