Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

STRING (WHERE)

HI,

I WANT ALL THE PCA WHERE THEIR PROJECT NOT STARTING WITH "DID"

IS THIS THE RIGHT WAY?

LOAD COMPANY&'-'&LOGISTIC_COMP&'-'&PROJECT&'-'&PCA AS T_Pca,
    
COMPANY,
    
LOGISTIC_COMP,
    
PROJECT,   
    
PCA,
    
PCA&' - '&PCA_NAME AS PcaNoName
FROM [..\..\DB\QVD\QV_DIM_PCA.qvd] (qvd)
Where PROJECT<>'DID%';

ADI

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Where Not PROJECT like 'DID*';

Or

Where Not(Left(PROJECT,3) = 'DID' );

View solution in original post

7 Replies
tresesco
MVP
MVP

Where not Wildmatch(PROJECT ,'DID*' );

anbu1984
Master III
Master III

Where Not PROJECT like 'DID*';

Or

Where Not(Left(PROJECT,3) = 'DID' );

its_anandrjs

Write like if the text start with word DID then try like

LOAD COMPANY&'-'&LOGISTIC_COMP&'-'&PROJECT&'-'&PCA AS T_Pca,
    
COMPANY,
    
LOGISTIC_COMP,
    
PROJECT,   
    
PCA,
    
PCA&' - '&PCA_NAME AS PcaNoName
FROM [..\..\DB\QVD\QV_DIM_PCA.qvd] (qvd)
Where Left( PROJECT,3 ) ='DID';


Regards,

Anand

Anonymous
Not applicable

Where Left( PROJECT,3 ) <>'DID';

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try LIKE with wild card characters

LOAD COMPANY&'-'&LOGISTIC_COMP&'-'&PROJECT&'-'&PCA AS T_Pca,
    
COMPANY,
    
LOGISTIC_COMP,
    
PROJECT,   
    
PCA,
    
PCA&' - '&PCA_NAME AS PcaNoName
FROM [..\..\DB\QVD\QV_DIM_PCA.qvd] (qvd)
Where PROJECT NOT LIKE 'DID*';


OR

Left(PROJECT, 3) <> 'DID';

Hope this helps you.

Regards,

jagan.

its_anandrjs

Hi Adi,

There is lot of write answer suggested if got correct answer then mark Correct or Helpful for references and please close the thread.

Regards

Anand

tresesco
MVP
MVP

If 'LIKE' is to be used, 'Not' should come immediate after WHERE, like:

Where PROJECT NOT LIKE 'DID*';

Where NOT PROJECT LIKE 'DID*';

This is because LIKE is an operator rather than a function.