Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a table X in the script.
X:
LOAD ID,
$(vY);
SQL SELECT ID",
$(vY)
FROM NameLevel ;
$(vY) gives me the columns as shown
ID |
NameL1 |
L1G1 |
L1Flag1 |
NameL2 |
L2G2 |
L2Flag2 |
NameL3 |
L3G3 |
L3Flag3 |
NameL4 |
L4G4 |
L4Flag4 |
And data is shown below:
I have to add a condition in the script where the highlighted data will be null if Flag=1.Here highlighted data in NameL2,L2G2,NameL3,L3G3,NameL4,L4G4 should be replaced by null if Flag=1
How can I do it in back end script. I cannot do this from frontend as there are multiple schema and logic should work on all.
Thanks
in advance
Dear Love,
You can change your current variable including the if statement $(vY), or you could create a secondary variable including your conditions like $(vYrules) that contain the rules.
Dear Ricardo,
If I have to use the same variable how should the if condition look like in the script? There is no other rule than having flag =1