Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a data set having ID as one of the fields. Ideally ID should be numeric; eg- 1234. In few of the records,there is a character 'P' appended at the end of the ID, eg-1234P. How can I find those records in my script ?
Actually, I want to identify those records and assign them a special status eg- Wrong Data whereas for all others I want this status to be Right Data so that in the front end I can use expressions excluding thhose Wrong data records.
Hi
LOAD ID,
If(Right(ID, 1) = 'P', 'Wrong', 'Right') As Flag,
...
or, to be more general:
If(IsNum(ID), 'Wrong', 'Right') As Flag,
If(IsNum(ID), 'Right', 'Wrong') As Flag,
HTH
Jonathan
Hi
LOAD ID,
If(Right(ID, 1) = 'P', 'Wrong', 'Right') As Flag,
...
or, to be more general:
If(IsNum(ID), 'Wrong', 'Right') As Flag,
If(IsNum(ID), 'Right', 'Wrong') As Flag,
HTH
Jonathan
Change in logic:
If(not IsNum(ID), 'Wrong', 'Right') As Flag
LOAD ID,
IF(IsNum(ID),'Right','Wrong')&' Data' as Status
Form yoursource;