All Forums Tools
terankit 77 posts Joined 03/12
18 Jul 2012
Can we use SELECT in MLOAD.

Hi,

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.

Thanks,

Terankit

terankit 77 posts Joined 03/12
18 Jul 2012

Hi,

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?

ulrich 816 posts Joined 09/09
18 Jul 2012

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?

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

terankit 77 posts Joined 03/12
18 Jul 2012

Hi Ulrich,

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.

Thanks.

feinholz 1234 posts Joined 05/08
18 Jul 2012

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].

--SteveF

terankit 77 posts Joined 03/12
18 Jul 2012

Thanks Feinholz

You must sign in to leave a comment.