I am trying to do a multiload, SELECT, UPDATE under mload. I have tried Update with Multiload and it is working fine but with SELECT it is giving error. Is there any way we can do this? Please help with example.
I am trying to Select the rows from the error tables after Multiload and if there is any row then quit with some perticular exit code. Iwant to do that in the same MLOAD sysin. Can I do it or I need to come out and then check the error?
First question is unclear to me. MLOAD is a load utility, so what do you want to achive?
Second question, question back: what is the exit code you get when MLOAD finished with rows in the error tables?
I am using MLOAD to insert data in a table using a file. Just after that I am trying to run this query:
SELECT * from error table
.if activitycount > 0 then .exit 4
but it is not allowing me to do the select and giving error for .IF statement as well.
You cannot issue a SELECT in the MultiLoad script.
However, if you want to exit with a different exit code based on whether there are rows in an error table, MultiLoad has system variables that contain that information and you use those system variables in the .IF statement.
Please refer to the MultiLoad Reference Manual for more information.
Hint: look up &SYSETCNT [n] and &SYSUVCNT [n].