Update Stored Procedure

Results 1 to 2 of 2

Thread: Update Stored Procedure

  1. #1
    Join Date
    Dec 1969

    Default Update Stored Procedure

    I am trying to update a recordset... the flow works fine and it says me record has been updated but it actually doesnt.<BR>This is the SP I am using to do so. Pls help somoene I have been stuck on this for 2 days not<BR><BR><BR>CREATE PROCEDURE sp04 <BR> (@ticket_no int,<BR> @category_id varchar(10),<BR> @title varchar(50),<BR> @subject varchar(50),<BR> @prob varchar(500))<BR> <BR><BR>as<BR><BR>begin<BR> if exists (select &#039;x&#039; from helpdesk..post_ticket<BR> where ticket_no = @ticket_no)<BR> begin<BR><BR> update post_ticket<BR> set category_id = @category_id,<BR> title = lower(ltrim(rtrim(@title))),<BR> subject = lower(ltrim(rtrim(@subject))),<BR> prob = lower(ltrim(rtrim(@prob)))<BR> <BR> end<BR> <BR> <BR> if @@error != 0 or @@rowcount = 0 <BR> begin<BR><BR> return 1<BR><BR> end<BR><BR> else<BR><BR> begin<BR><BR> return 0<BR> <BR> end <BR> <BR>end<BR>go<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Update Stored Procedure

    don&#039;t return things, SELECT things.<BR><BR>have you tested this in SQL Query analyzer to see what actually gets returned from it?<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts