Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to output N where [alg-stat] is blank and below is my script
Allergens_Data:
NoConcatenate load
upper([p-code]) as [p-code], //Upper done in products table
[p-split1] //Parent product code
Resident Products
where [p-split]=1;
//Join on split product allergen data based on parent product code
left join (Allergens_Data)
load
upper([p-code]) as [p-split1], //Parent product code
[alg-code],
[qual-code],
[alg-stat] Where [alg-stat]='','N'
FROM
***
Hi Mike,
Use something like:
//Join on split product allergen data based on parent product code
left join (Allergens_Data)
load
upper([p-code]) as [p-split1], //Parent product code
[alg-code],
[qual-code],
[alg-stat]
FROM [ Whatever]
Where len([alg-stat])=0 or [alg-stat]='N';
May be this
Allergens_Data:
NoConcatenate
LOAD upper([p-code]) as [p-code], //Upper done in products table
[p-split1] //Parent product code
Resident Products
Where [p-split]=1;
//Join on split product allergen data based on parent product code
left join (Allergens_Data)
load Upper([p-code]) as [p-split1], //Parent product code
[alg-code],
[qual-code],
[alg-stat]
FROM
***;
Final_Allergens_Data:
LOAD *,
If(Len(Trim([alg-stat])) = 0, 'N', [alg-stat]) as [New-alg-stat]
Resident Allergens_Data;
DROP Table Allergens_Data;
DROP FIELD [alg-stat] FROM Final_Allergens_Data;
RENAME FIELD [New-alg-stat] to [alg-stat];