Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I load data from SQL but I want to load some data and I have Problem following

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);

Capture.JPG

3 Replies
Anonymous
Not applicable
Author

Problem

Capture.JPG

alexandrakfcosta
Contributor III
Contributor III

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

Anonymous
Not applicable
Author

thank you