Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I load data from SQL but I want to load some data and I have Problem following
FROM "MIS_DataLake_UAT".dbo."SAP_COST"
where "S_ACCOUNT" = ('68001000','52001500','68119000','68002000'),
where "S_SESSION_NAME" <> ('ARF0214DMSAR','ARF0114DMSAR','APF0214DMSAP','APF0114DMSAP','APF0114ADVAP','APF0114AD2AP'),
where "S_REF_KEY_1" <> ('OIL'),
where "S_REF_KEY_1" = 'WAG' and "S_REF_KEY_2" <> (2,3);
Problem
Hi, Surawut.
I think the problem is with the SQL syntax in the WHERE clause.
The way to use multiple WHERE clauses is using the connector AND (and removing the commas at the end of each line), like this:
WHERE "S_ACCOUNT" = ('68001000','52001500','68119000','68002000')
AND "S_SESSION_NAME" <> ('ARF0214DMSAR','ARF0114DMSAR','APF0214DMSAP','APF0114DMSAP','APF0114ADVAP','APF0114AD2AP')
AND "S_REF_KEY_1" <> ('OIL')
AND "S_REF_KEY_1" = 'WAG' and "S_REF_KEY_2" <> (2,3);
I hope I could help.
Best,
Alexandra Costa
thank you