Hi all,
I am basically an Oracle Developer trying to migrate oracle procedures to DB2 procedures. I am having a problem checking the result set of the cursor. in oracle we use cursor attributes such as cursor-name NOT FOUND etc...., but how do I check the same in DB2 if the cursor retrived any...
Can anyone plz tell me what is worng in the following statement? I am trying to declare a LONG varable to hold a very large string.
DECLARE str LONG VARCHAR(8000);
THX:)
can anyone plz tell me how to display the error messages in DB2 stored procedures? I need to catch the error message and insert into a status table to check the success of the program(stored procedure).
Thanks!!!
Does anyone know how to 'truncate' a table in DB2? Truncate in Oracle and SQL server is used to completely delete all rows in a table without any logging. But this doesn't seem to work in DB2.
Please Help!!
Thanks!
I am completely new to DB2. Can anyone plz tell me the command in DB2 to print a string? And also any refernce to DB2 books would be great!!!
Thanks in advance!
Hi,
I am trying to insert data from a temperory table to an permanent table based on some business rules in T-sql procedure using dyanmic t-sql. The temperory and the permanent tables has the same columns. When i am doing the following Insert, it is only working if the temperory table has all...
This code works but do i have to put this in each section of code?? Is there any other way to put this in a genralized block and call it like when we check the error exist :
"if @e <> 0 then go to the error block"
declare @e int
set @e = @@error
if @e <> 0
begin...
Hi,
Can anyone plz. tell me how to print the error number and the error message and insert them into a log table. And also do I need to check for errors after every DML statement or can I just handle them at the end of each block??
Thanks in advance.
Hi,
I am trying to create dynamic tables but I want to check if they already exists in the database. Can anyone please tell me how to check if a table already exists in a sql server database??
Thanks in advance.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.