Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
i gat an issue i have a table, and i want to add a field but i don't manage with the conditionnal logics.
FACTURE_INDICATEUR3:
LOAD
FACTURE_INC.GPE_CLIENT,
FACTURE_INC.CodifCreno,
Catalogue_marque,
catalogue_famille,
if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE') and (Catalogue_marque not like API* ),'OK','Interdit') as Test
FROM
FACTURE_INDICATEUR.QVD
(qvd);
But there is a problem with the not like.. any one can help me?
Thanks you so much ! And sorry for my bad english !
and (not Wildmatch(Catalogue_marque ,'API*'))
Hi sap,
just try WILDMATCH() - combined with NOT, so it would be NOT(WILDMATCH()) - in that, you can use the *
- alternatively, you could use LEFT(Catalogue_marque, 3) to split out those letters which should be > API < ...
HTH
Best regards,
DataNibbler
and (not Wildmatch(Catalogue_marque ,'API*'))
Try the following :
if (catalogue_famille='LEGUMES 4G',
IF(FACTURE_INC.GPE_CLIENT='RESTALLIANCE',
IF(not Wildmatch(Catalogue_marque ,'API*')),
'OK','Interdit'))) as Test
Hi,
Try with wildmatch() or match()
Try like
if (wildmatch(catalogue_famille,'LEGUMES 4G') and wildmatch(FACTURE_INC.GPE_CLIENT,'RESTALLIANCE')
and not wildmatch(Catalogue_marque,'API*'),'OK','Interdit') as Test
Regards
Try below code :
FACTURE_INDICATEUR3:
LOAD
FACTURE_INC.GPE_CLIENT,
FACTURE_INC.CodifCreno,
Catalogue_marque,
left(Catalogue_marque,3) as Catalogue_marque1
catalogue_famille,
if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE')
and (Catalogue_marque1<>'API' ),'OK','Interdit') as Test
FROM
FACTURE_INDICATEUR.QVD
(qvd);
Hi,
Try like this
FACTURE_INDICATEUR3:
LOAD
FACTURE_INC.GPE_CLIENT,
FACTURE_INC.CodifCreno,
Catalogue_marque,
catalogue_famille,
if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE') and (not Catalogue_marque like 'API*' ),'OK','Interdit') as Test
FROM
FACTURE_INDICATEUR.QVDu
(qvd);
Hope this helps you.
Regards,
Jagan.
Thanks a lot everybody !!!