Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

in/contain clause

I want a function that is the same as in clause in sql and crystal. I want to check if a particular field contains a particular word. is that possible?

I want to use it as an expression in a table

3 Replies
Not applicable
Author

take a look at the Match() function if you are looking at the whole field value or wildmatch() if looking at a section

You'll find both in the QV manual with further details

hope that helps

Joe

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can use Index() or WildMatch to do that:

          =Index(Field, 'phrase')

          or

          =WildMatch(Field, '*phrase*')

          or

          =Match(Field, 'prase')  // exact match

          or

          =Field = 'phrase'     // exact match

These will return 0 is 'phrase' is not in Field. If you want to use it to select rows where the Field = 'phrase', then

LOAD *

FROM Table.qvd

Where  WildMatch(Field, '*phrase*')  // whichever works best

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi,

Below qlikview function will help you to achieve same result as SQL IN clause,

Match( Month, 'Jan','Feb','Mar') // This function perform case sensitive comparison

MixMatch( Month, 'Jan','Feb','Mar') // This function perform case insensitive comparison

WildMatch( Month, 'ja*','fe?','mar') // This function perform case insensitive comparison and permits the use of wildcard characters.


Hope this helps you.