Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
srinivasa1
Creator II
Creator II

Error im geeting while using in statement in Sql

Pls can any one help me out to use in Statement in Sql i have script like bellow ie:



where

thx in adavance

ReviewStatus in ('N','R','RED','YELLOW') ;



15 Replies
Not applicable

Could you re-paste that in? What error are you getting?

ReviewStatus in ('N', 'R', 'RED', 'YELLOW') seems okay, but we need more info to determine the problem.

srinivasa1
Creator II
Creator II
Author

Hi NMiller.

thanks for your suggestion.sorry for dealy to reply. im lodaing filr form text file my load script as bellow.



Load

CustId,

CustName

FROM

HumanaNightly20110120.txt

(txt, codepage is 1252, embedded labels, delimiter is '|', msq)

where ReviewStatus in ('N' ,'R' ,'RED' )





maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

If this is not working then take a resident of the table and use the following script.

Load * resident Table where wildmatch(ReviewStatus,'N','R','RED','YELLOW')>0;

will work fine.

Anonymous
Not applicable

This is not a SQL statement. SQL statements start from SELECT, not from LOAD. What you have is the QlikView LOAD statement, and it does not use in(). You can use match instead:
where match(ReviewStatus,'N' ,'R' ,'RED')

srinivasa1
Creator II
Creator II
Author

Thx Manesh,

but i wanted use in statment while loading only .why i need to create once again resident table if it possible handle in same stament. is there any other way or any Sql Load i has to use.

thx

srinivasa1
Creator II
Creator II
Author

Thx Micchael.

I wll try this .

srinivasa1
Creator II
Creator II
Author

hi thx its working without Error. its simlary to SqlServer IN Statement ?

thx

maneshkhottcpl
Partner - Creator III
Partner - Creator III

U can use this code.

where match(Quarter,'1')>0;



Anonymous
Not applicable

Similar but not exactly.
match() is comparing the exact case-sensitive values
wildmatch() is case-insentive, and you can use wildcards: wildmatch(field, '*abc*', '*de*', '*fg*'). Someithnig you can compare to "like", but for multiple values.