Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want my load script to stop once a certain value is reached for a field. Something like :
Load A,
B
From .... exit/stop load(should not exit script) when found B='XX'(line number is not fixed, so can't use recno());
Thanks in advance.
I don't think so. I'm afraid you'll need something like this:
T1:
load B, if(B='XX',recno()) as flag
from ...somewhere...;
T2:
load min(flag) as firstmatch
resident T1;
Let vFirst = peek('firstmatch');
drop table T1, T2;
T3:
first $(vFirst)
load * from ...somewhere...;
Yes Gysbert, as i mentioned earlier - "using multiple stages (storing to qvd and then using flag or variable), may be i can achieve the same" - seems that, this is the way(like you suggested) i have to follow. Probably there is no direct way/function/command to break out from the LOAD process.
Anyway thank you all.