Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can anyone tell me what is the difference between the following scripts:
Suppose we have a variable called "A" and is set to = 1;
If A = 1 then
load * inline{
Col A, Col B,
1,2,
3,4
];
end if;
---------------------
When A := 1
load * inline{
Col A, Col B,
1,2,
3,4
];
Would second query be fired automatically if the value of variable "A" changed to something other than 1 and than change back to 1?
Thanks!
An if statement can have an else branch, a when statement doesn't. With a When there's only one block of code that will or will not be executed. In an If-then-else you can have two alternative blocks of code. See the online help: When
In first code the table is run and loaded while in the second code it will not run as Gysbert suggest you have to use When with nested if statement.
Regards
Anand