Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there folks,
I am trying to figure something out here, I would like to remove all descriptions from a field which starts with the character '.' and '-'.
I have tried the below script but failed badly, could anyone point me in the right direction or advise on what am doing wrong here.
Table_A:
Load
[Country],
[Date],
[BrandDesc]
from ....
where [BrandDesc] <> '.*' and [BrandDesc] <> '-*';
Thanks in advance.
Best Regards,
Ram
Use WildMatch() function. Like:
Table_A:
Load
[Country],
[Date],
[BrandDesc]
from ....
where Not WildMatch([BrandDesc], '.*' , '-*' );
Use WildMatch() function. Like:
Table_A:
Load
[Country],
[Date],
[BrandDesc]
from ....
where Not WildMatch([BrandDesc], '.*' , '-*' );
Hi Ram,
Are you load data from QVD? If yes, then try
Where not WildMatch([BrandDesc],'.*','-*');
Thanks! Spot on.
Thanks! Spot on.
Hi,
If you only want to remove these description but keep the rest of the fields for each record of the table I suggest using the following:
Table_A:
Load
[Country],
[Date],
If(not( Left([BrandDesc],1)='.') or not( Left([BrandDesc],1)='-'), [BrandDesc] ,null()) as [BrandDesc]
from ...;
Regards
Thanks!