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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Lance1
Contributor
Contributor

Returning certain values in Where clause

Hello, I am new to QlikSense and am trying to limit the transaction type that returns from a large set of data in a QVD file. 

My script looks like this, where table is named Trans Type:

[Trans Type]:
LOAD
"AR_TRANS_TYP_KEY" as [~AR_TRANS_TYP_KEY],
"Trans Type Code",
"Trans Type",
"Trans Type Desc",
"Trans Rebill Indicator",
"Trans Relocation Indicator",
"Trans Type Category",
"Partner Type",
"Ledger PL Type"
FROM [lib://$(vRepoConnection)/MyDIM.qvd]

Where [~AR_TRANS_STAT_KEY] in ("10","11","12","13")

(qvd);

It is giving me an error. Is there another way to limit to just the transaction key numbers I want to return? 

2 Solutions

Accepted Solutions
Or
MVP
MVP

Your issue is with using "in", which is not part of Qlik's syntax.

Instead, try using:

Where Match([~AR_TRANS_STAT_KEY],'10','11','12','13')

I'm not sure offhand but I think this is supposed to go after the (qvd), but before the ;

View solution in original post

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi, there is a syntax error in the FROM clause:

FROM [lib://xxxxxx/xxxxx/xxxx/ffff.qvd] (qvd)

Where ....

 

JG

View solution in original post

5 Replies
Or
MVP
MVP

Your issue is with using "in", which is not part of Qlik's syntax.

Instead, try using:

Where Match([~AR_TRANS_STAT_KEY],'10','11','12','13')

I'm not sure offhand but I think this is supposed to go after the (qvd), but before the ;

m_woolf
Master II
Master II

You can't use SQL syntax in a Qlik LOAD.

Maybe something like:

...

FROM [lib://$(vRepoConnection)/MyDIM.qvd] (qvd)

Where MATCH(AR_TRANS_STAT_KEY,'10','11','12','13')

;

Lance1
Contributor
Contributor
Author

I received this error message when loading the above suggestion. I am stuck.I received this error message when loading the above suggestion. I am stuck.

 

It loads AR_Trans_Type_Key fine without the Where clause.

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi, there is a syntax error in the FROM clause:

FROM [lib://xxxxxx/xxxxx/xxxx/ffff.qvd] (qvd)

Where ....

 

JG

Lance1
Contributor
Contributor
Author

Thank you for the help. I think this has been corrected and it is working now. Much appreciated for all the help!