Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have locations V800 to V899. i want to write a IF statement to get V800toV829 and V880 to V899 as locations. my column name is "loc". how should I do this?
You can do like this
If(PurgeChar(loc,'V') >=800 and PurgeChar(loc,'V') <=829, <Any Expression or Dimension>)
Hi,
Try this script
Tbl1:
Load
Location,
KeepChar(Location,'0,1,2,3,4,5,6,7,8,9') as NumLocation,
From a.qvd;
Tbl2:
Load *,
IF(NumLocation,>=1 and NumLocation,<=10,'Location1','Location2') as NewLocation,
Resident Tbl1;
Drop Table Tbl1;
Regards
Kumar
Hi,
From your condition you want to get fields or want to get the values only let me know.
Thanks & Regards
i want to get values
Hi,
Write a code for load statement some thing like this
Temp:
LOAD
loc
from your location;
Data:
load
*,
if(right(loc,3) >= 800 and right(loc,3) <= 829, loc) as Condition1,
if(right(loc,3) >= 880 and right(loc,3) <= 899, loc) as Condition2
Resident Temp;
DROP Table Temp;