Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I load few tables with the same structure and i want to create simple if statement before every load (except first).
LOAD:
employee | manager |
---|---|
A | man1 |
B | man2 |
LOAD:
employee2 | manager |
---|---|
C | man5 |
I just want to check if the last downloaded value in manager field isn't 'man5'. I tried use
if FieldValue('manager', 0)<>'man5' then
LOAD ...
...
end if
but this doesnt work (I also tried peek), any idea what am i doing wrong ?
You could try this:
LOAD...
WHERE NOT EXISTS(manager,'man5')
Load ...
where manager <> 'man5';
You got me wrong,
What im doing is gathering information about employee from Active Directory - i check his manager and department, then i check the boss of the manager and his department and so on ... until i download data about the head of the company (nobody is higher). And in this point i want to finish execution of the script using some if statement.