Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a code in my script like this that somebody has written previously:
If(Sales> '0' or [Sales Flag] = 'Y', 'Y', 'N') as WarrantFlag
What is this code mean?
Is it like this? if sales is greater than zero or Sales flag = Y then Y otherwise N.
If i want to us these piece of code in where clause after the load statement then how should i write the code?
Thanks,
ahmed100
LOAD *
;
from
table
where
Sales> '0' or [Sales Flag] = 'Y';
this should work
Hi
Your understanding is correct
if sales is greater than zero or Sales flag = Y then Y otherwise N.
Try like this
Load * where WarrantFlag = 'Y'; // Preceding Load
Load *, If(Sales> '0' or [Sales Flag] = 'Y', 'Y', 'N') as WarrantFlag
Your TableName;
You can use like this.
Load
------,
----,
---
from xyx Where Sales > '0' or [Sales Flag] = 'Y' ;