Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Where clause on load QVD and table

The following load works from a QVD:

FROM
[..\QVD\01_Extract_QVD\APP_ELD.QVD]
(qvd)
where  EXP_TYPE_CODE <> ('Operating') and  ALT_REQUEST_ID like 'FC*';

but the same type of syntax does not work for a table via odbc:

FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"

where  REQ_STATUS not in ('Not Submitted') and REQ_ID like 'FC*' ;

nor does:

FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"

where  REQ_STATUS not in ('Not Submitted') and REQ_ID in ('FC*') ;

Help?

1 Solution

Accepted Solutions
cbaqir
Specialist II
Specialist II
Author

Hey I think I got it...

LOAD WildMatch("REQ_ID", 'FC*') as REQ_ID,

SQL SELECT *
FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"
where REQ_STATUS not in ('Not Submitted')

View solution in original post

4 Replies
sunny_talwar

Either you need to restrict this using SQL syntax to restrict the data or use Where statement in the preceding load. I would suggest the 1st method, but cannot really tell because I don't have expertise in SQL.

For second option:

LOAD *

Where Match(EXP_TYPE_CODE, 'Operating') and WildMatch(ALT_REQUEST_ID, 'FC*');

SQL SELECT FieldNames

FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"

cbaqir
Specialist II
Specialist II
Author

I think the syntax is what is wrong or that line is in the wrong order. I'm confused because this works:

Load *

SQL SELECT *
FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"
where REQ_STATUS not in ('Not Submitted')  ;

sunny_talwar

Not really sure how to do this in SQL. I still need to learn that, but I hope someone will be able to help you here

cbaqir
Specialist II
Specialist II
Author

Hey I think I got it...

LOAD WildMatch("REQ_ID", 'FC*') as REQ_ID,

SQL SELECT *
FROM "IT_DW".dbo."DM_STAT_REQ_ALL_V"
where REQ_STATUS not in ('Not Submitted')