Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I want to duplicate an existing field called DESCRIPTION and name the duplicated field 'description' and I only want 'decscription' to display descriptions which start with 'U' and 'u'. How do I do this? Thanks.
DESCRIPTION and name the duplicated field 'description'
Load *,If(Upper(DESCRIPTION) like 'U*',DESCRIPTION) as description Resident tab;
Or
Load *,If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',DESCRIPTION) as description Resident tab;
Or
Load *,If(WildMatch(DESCRIPTION,'U*'),DESCRIPTION) as description Resident tab;
LOAD IF(LEFT(DESCRIPTION,1)='U' OR LEFT(DESCRIPTION,1)='u',DESCRIPTION,NULL()) AS description
RESIDENT......
DESCRIPTION and name the duplicated field 'description'
Load *,If(Upper(DESCRIPTION) like 'U*',DESCRIPTION) as description Resident tab;
Or
Load *,If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',DESCRIPTION) as description Resident tab;
Or
Load *,If(WildMatch(DESCRIPTION,'U*'),DESCRIPTION) as description Resident tab;
I used your 2nd statement but now 'description' has blank records and descriptions which start with 'U' and 'u'. How do I remove those blank records? Thanks.
Use WHERE NOT ISNULL(If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',DESCRIPTION));
Load *
where not isnull(NewDescription);
Load *,
if(left(capitalize(trim(DESCRIPTION)),1)='U','Description') as NewDescription
from path;
Tab1:
Load *,If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',DESCRIPTION) as description Resident tab;
Final:
Load * Resident Tab1 Where Not(IsNull(description));