Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Removing string

Hi all,

i want to remove string from column starting with DI99.

Can u plz suggest how to proceed for this.

Thanks,

15 Replies
tresesco
MVP
MVP

Load

          field

From <> Where not WildMatch(field, 'DI99*') ;

Note:

           'DI99*' - removes rows that STARTS with 'DI99'

            '*DI99*' - removes rows that have  'DI99' anywhere  in the string.

So use the one you need. If you have doubt, try to post your sample qvw.  

preminqlik
Specialist II
Specialist II

i think u need this

Load *,

if(wildmatch(field,'DI99*'),null(),field)               as               Newfield

from path;

its_anandrjs
Champion III
Champion III

It seems work fine for you but if you want to exclude that word which contains string DI99 in any position then you have to use

Load

*

From Location

Where Not Wildmatch(DealerToDealerInvoiceCode,'*DI99*');

Or

If it is first position then use

Load

*

From Location

Where Not Wildmatch(DealerToDealerInvoiceCode,'DI99*');


deepakqlikview_123
Specialist
Specialist
Author

Hi Anand,

Thanks for reply.

I f I use  where not exists(DealerToDealerInvoiceDate,'*DI99*') instead of Where Not Wildmatch(DealerToDealerInvoiceCode,'*DI99*');will it gives me same result.

Which will be better in which case .

Can u plz suggest,

Thanks

jagan
Partner - Champion III
Partner - Champion III

Hi Deepak,

As far as I concern the condition is correct

Where Not Wildmatch(DealerToDealerInvoiceCode,'*DI99*');

instead of using Exists().

Regards,

Jagan.

its_anandrjs
Champion III
Champion III

Hi Deepak,

The right script will be Wildmatch(DealerToDealerInvoiceCode,'*DI99*'); exists are used where we need to exclude or include some key values from the fields here is condition where from each row we have to find the string D199 and exclude them.

Regards