Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have sample data for Product Id
Product Id
A02
A02-101
A02-102
A02-104
A03
A04
A05
A05-101
A05-103
A06
A06-101
A06-102
A07
How I remove all data which is present with special character '-'.
Expected output -
Product Id
A02
A03
A04
A05
A06
A07
Thanks in advance.
Hi Ishwar,
Try:
Data:
LOAD * WHERE Not WildMatch([Product Id],'*-*');
LOAD * INLINE [
Product Id
A02
A02-101
A02-102
A02-104
A03
A04
A05
A05-101
A05-103
A06
A06-101
A06-102
A07
];
Giving
Product Id |
---|
A02 |
A03 |
A04 |
A05 |
A06 |
A07 |
Regards
Andrew
This?
LOAD SubField(Field, '-', 1) as Field Inline [
Field
A02
A02-101
A02-102
A02-104
A03
A04
A05
A05-101
A05-103
A06
A06-101
A06-102
A07
];
Hi Anil,
Thanks for your quick reply I have already I tried this option but this option not remove data with present with special character
Please provide with some special characters too
Hi Anil,
I have used same expression data shows without special character but it also capture special character data
e.g.
SubField(Product Id, '-', 1) Capture data
A02 A02
A02-101
A02-102
A02-104
here SubField() function shows A02 but it capture remaining three code data of special character.
I want only A02 product code data
e.g.
SubField(Product Id, '-', 1) Capture data
A02 A02
It should not capture other three product data that is my expected output.
Is the any other solution?
Are you not looking this?
Hi Ishwar,
Try:
Data:
LOAD * WHERE Not WildMatch([Product Id],'*-*');
LOAD * INLINE [
Product Id
A02
A02-101
A02-102
A02-104
A03
A04
A05
A05-101
A05-103
A06
A06-101
A06-102
A07
];
Giving
Product Id |
---|
A02 |
A03 |
A04 |
A05 |
A06 |
A07 |
Regards
Andrew
Try these condition while loading data
where Len([Product Id]) =3
else
where not wildmatch([Product Id],'*-*')
Hi Andrew,
I used your solution and I got answer.
Thanks
Thanks Shradhha,
I got the answer