Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Case WHEN ITEM_ID = 'LI_NRR6R7'
AND (ACCOUNT_NO = '10-2980928'
OR ACCOUNT_NO LIKE '10-6%'
OR ACCOUNT_NO LIKE '10-H%' '
OR ACCOUNT_NO = '55-7324302'
OR ACCOUNT_NO = '81-1039237'
THEN SUBSTR(ACCOUNT_NO,-7)
ELSE ACCOUNT_NO END AS InSite_Acct,
I tried
if(match([ITEM ID],'LI_NRR6R7') and if
(Wildmatch([Account Number],'10-2980928*','10-6*','10-H*','55-7324302*', '81-1039237*, mid([Account Number],-7)),
[Account Number]) as InSite_Acct
It is not working.Please help me with this.
Try
if(match([ITEM ID],'LI_NRR6R7') and
Wildmatch([Account Number],'10-2980928*','10-6*','10-H*','55-7324302*', '81-1039237*), right([Account Number],7),
[Account Number]) as InSite_Acct
Try
if(match([ITEM ID],'LI_NRR6R7') and
Wildmatch([Account Number],'10-2980928*','10-6*','10-H*','55-7324302*', '81-1039237*), right([Account Number],7),
[Account Number]) as InSite_Acct
Try this:
if(ITEM_ID = 'LI_NRR6R7' and wildmatch(ACCOUNT_NO, '10-2980928*','10-6*','10-H*','55-7324302*', '81-1039237*'), right(ACCOUNT_NO,7), ACCOUNT_NO) AS InSite_Acct,
I think you need something for the if statement to actually test?
Try
if(match([ITEM ID],'LI_NRR6R7') > 0 and
Wildmatch([Account Number],'10-2980928*','10-6*','10-H*','55-7324302*', '81-1039237*) > 0, right([Account Number],7),
[Account Number]) as InSite_Acct