Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do i convert SQL SUBSTRING matching numbers logic into QLIKVIEW logic

Dear Expertis,

I'm struggling with one requirement convert into Qlikview from sql logic


]this is my SQL logic where left first number match with numbers like 0,1,2,3,4,5,6,7,8,9  give some coloumn name or else different name .please see the below logic: 

Case when SUSTR (ID,1,1) IN ('0','1','2','3','4','5','6','7','8','9') THEN 'ORDID' ELSE ID as derived_order

How do i the same way  need to convert into QLikview ?? ,the table values  look like below one

ID

11ABC

21XYZ

31cd

ASD

CTR

xtr

nkm

11ABC,21XYZ,31cd  }----->     'ORDID' then 'Non-ORDID'



Please guide me how to acheive this .

8 Replies
sunny_talwar

May be this

If(IsNum(Left(ID, 1)), 'ORDID', 'Non-ORDID')

sunny_talwar

Or this:

If(Match(Left(ID, 1), 1, 2, 3, 4, 5, 6, 7, 8, 9, 0), 'ORDID', 'Non-ORDID')

Not applicable
Author

Brilliant Sunny ,both logics are working

sunny_talwar

Sweet

Not applicable
Author

I couldnt find 'CORRECT ANSWER' option ,gudie me where i can find this

sunny_talwar

This thread was opened as a discussion rather than a question and cannot be marked with a 'Correct Response'. I guess next time you create a new thread, make sure to keep it as a question instead of a discussion (unless it is a discussion that you want to have)

Not applicable
Author

Hi Sunny ,

I have checked that Box as a Question but unfornately i wouldt get  'Correct Answer Option'

Correct me if i am wrong,if i uncheck the box it would be Discussion Right  ?

Regards,

Sunni

sunny_talwar

Yes, and you can only change between discussion and question in first 15 mins. That window is long gone... so don't worry about it

The only thing I would suggest is that only mark responses which are truly helpful as helpful responses. You marked your own post where you were just acknowledging my responses. How is that going to be helpful for future users visiting this page? The functionality is not just to give points, but to make this community a better place where we can find answer quickly. and this can be only done if all of us play our part well

Best,

Sunny