Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm getting null values stored in the variables. Please could anyone say what I did wrong in the script?
Attached my QVW file. Please help.
Thanks,
Siva.
Can you make this table in inline with few rows, Will test the same
VarCustomer:
LOAD Distinct Customer as VarCustomer,
Originformat as IN,
Destinationformat as OUT
Resident Fields2;
Please find the below data,
LOAD * INLINE [
Customer, Origin Format, Destination Format
Crago, HR, X12
Hapg, HR, X12
Mrsk, CIDX, GIX
Addnt, HR, EDIFACT
];
your issue may be here because of empty spaces :
Fields2:
LOAD *,
if(Len(BusinessInputFieldFlag)=0,'N',BusinessInputFieldFlag) as BIFF,
if(Len(BusinessOutputFieldFlag)=0,'N',BusinessOutputFieldFlag) as BOFF
Resident Customer;
Try:
Fields2:
LOAD *,
if(Len(Trim(BusinessInputFieldFlag))=0,'N',BusinessInputFieldFlag) as BIFF,
if(Len(Trim(BusinessOutputFieldFlag))=0,'N',BusinessOutputFieldFlag) as BOFF
Resident Customer;
This will return 0 for nulls and empty spaces
HTH Jim
Looks good until unless you provide real data.