Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dataforums

    check the cursors result set in a stored procedure

    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...
  2. dataforums

    check existence of a stored procedure

    Thanks!. That helps.
  3. dataforums

    check existence of a stored procedure

    Does anyone know how to check if a DB2 stored Procedure exists in the database?
  4. dataforums

    LONG VARCHAR in DB2

    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:)
  5. dataforums

    Displaying error messages in DB2 procedures

    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!!!
  6. dataforums

    Truncate in DB2

    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!
  7. dataforums

    Sample stored procedures

    Can someone post simple stored procedures in DB2? Thanks!
  8. dataforums

    Print command in DB2

    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!
  9. dataforums

    insert values using dynamic t-sql

    Thanks Jay. It worked.
  10. dataforums

    insert values using dynamic t-sql

    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...
  11. dataforums

    log error messages in a table

    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...
  12. dataforums

    log error messages in a table

    Thanks Rob. I'll try it.
  13. dataforums

    log error messages in a table

    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.
  14. dataforums

    Check if a table exists in the database

    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.
  15. dataforums

    Error using cursor within a cursor in t-sql

    I have to check some conditions and load data from all these temperory tables into their respective permanent tables. so i have to loop thorugh each table and update their permanent table. I have done the same thing in oracle using REF Cursor, but i don't know if t-sql has ths concept.
  16. dataforums

    Error using cursor within a cursor in t-sql

    I get the follwoing error: Server: Msg 137, Level 15, State 2, Line 31 Must declare the variable '@temp_tab'. Can u suggest me as to how to loop through the table that comes from the variable temp_tab?
  17. dataforums

    Error using cursor within a cursor in t-sql

    Hi guys, I think this a simple error but i haven't been able to figure out what's wrong with the code below: Declare temp_cur CURSOR FOR select table_name from INFORMATION_SCHEMA.TABLES where table_name like 'SAMP_TMP_%' OPEN temp_cur FETCH NEXT FROM temp_cur into @temp_tab WHILE...
  18. dataforums

    ref cursors in T-sql

    Hi All, I have a requirement that the STORED PROCEDURE should return records same like storedprocedure in sqlserver. In oracle ref cursors are used to return multiple values, is there anything in t-sql that can perform this.
  19. dataforums

    Can anyone plz. let me know what the following error means?

    I get an error message for the foll. dynamic sql code: ******************************************************** Declare temp_cur CURSOR FOR select table_name from INFORMATION_SCHEMA.TABLES where table_name like 'SAMP_TMP_%' OPEN temp_cur FETCH NEXT FROM temp_cur into @temp_tab PRINT 'Record...

Part and Inventory Search

Back
Top