Search Result

Collapse
4 results in 0.0040 seconds.
Keywords
Members
Tags
stored procedures
  •  

  • Can I get an example of a DB2 Stored Procedure with Loop & Commit?

    I'm trying to create a DB2 stored procedure that will loop through a delete statement and commit after every 5000 records. Continuing to delete until the statement is satisfied and all records which fit the criteria are deleted from the table.

    Here is an example of my statement:
    Code:
    DELETE FROM (SELECT * FROM tablename WHERE date_stamp = CURRENT date);
    Thank you.
    Roy
    See more | Go to post

  • nuhbye
    started a topic How to transfer a table content to a Outfile.

    How to transfer a table content to a Outfile.

    I am trying to transfer output of a query to some file whose name will be available only at the run time.
    My CODE looks something like this, this code is a part of stored procedure.

    Code:
    set FILENAME = uid + (select phone_no from table2 where user_ID = uid);
    
    select startstop from table1 INTO OUTFILE FILENAME;

    My code works fine if i use specific file names like...
    See more | Go to post

  • Returning value from Like statement in SQL server 2008 to vb.net

    I'm in a bit of a pickle here. I need to pass the variable @uname which gets a value from a text box to a statement on one of my stored procedures in SQL server and return an output on my form.

    Here is the code:

    in .net
    Code:
    cmd = New SqlCommand
            cmd.CommandText = "sp_TransData"
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.Add("@unamex",SqlDbType.VarChar,15)
    ...
    See more | Go to post

  • gjain12
    started a topic A long string as a Input parameter in procedure
    in DB2

    A long string as a Input parameter in procedure

    Hi All,
    I want to create an Input Parameter in my procedure which can take a long string of 3000 or more characters.
    The strored procedure then use this input parameter as clob type to a function which would do further processing.
    But I am not able to find how to create input parameter for such a long string haivng 3000 or more characters.
    Any pointers would be very helpful.

    Thanks,
    Abhishek Chow...
    See more | Go to post
Working...