Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

How to remove required characters from field value

Hi All,

LOAD

   [Product],[Product Type],[Product Number],[Order],[Order Type],[Order Number] as Field

resindent table;

Here i need to remove "[Product Type],[Order Type]" from filed.

I tried purgechare, it removes [Product Type],[Order Type] and all [] and Product(i mean Product, Product from Product Number) from field as well.

Can you assist on this please.

Thanks,

Nihhal.

1 Solution

Accepted Solutions
sunny_talwar

May be use Replace multiple times

LOAD *,

          Replace(Replace(Field, [Product Type], ''), [Order Type], '') as NewField;

LOAD  [Product],[Product Type],[Product Number],[Order],[Order Type],[Order Number] as Field

resindent table;

View solution in original post

24 Replies
Frank_Hartmann
Master II
Master II

what about omitting these fields in the load?

LOAD

   [Product],[Product Number],[Order],[Order Number] as Field

resindent table;

its_anandrjs

Please elaborate why you use PurgeChar()

LOAD

   [Product],[Product Type],[Product Number],[Order],[Order Type],[Order Number] as Field

resindent table;

Is this your field

   [Product]&[Product Type]&[Product Number]&[Order]&[Order Type]&[Order Number] as Field

Regards
Anand

Anonymous
Not applicable

Hi,

You can use pick and match function.

Thanks,

sunny_talwar

Would you be able to share few rows of data to show what you have and what you are looking to get?

nihhalmca
Specialist II
Specialist II
Author

Simple Sunny.

My direct question is, i want to exclude some chartacters from the field value however those are repeated in fied value.

I hope i explained very clear.

its_anandrjs

Please share some data to have a look.

Regards

Anand

nihhalmca
Specialist II
Specialist II
Author

Hi Anand,

I shared field "value" in my first post (question).

sunny_talwar

May be use Replace multiple times

LOAD *,

          Replace(Replace(Field, [Product Type], ''), [Order Type], '') as NewField;

LOAD  [Product],[Product Type],[Product Number],[Order],[Order Type],[Order Number] as Field

resindent table;

nihhalmca
Specialist II
Specialist II
Author

Hi Sunny, its working with small changes.

LOAD *,

          Replace(Replace(Field, '[Product Type],', ''), '[Order Type],', '') as NewField;

LOAD  [Product],[Product Type],[Product Number],[Order],[Order Type],[Order Number] as Field

resindent table;