sql output parameter question

Results 1 to 2 of 2

Thread: sql output parameter question

  1. #1
    Join Date
    Dec 1969

    Default sql output parameter question

    when i write this stored proc <BR>it is doing the insert ok<BR>but not doing the update .. help me<BR><BR>CREATE PROCEDURE pr_Generate_QuoteID <BR><BR>@Client_ID int,<BR>@BrokerID int,<BR>@PolicyTypeID int , <BR>@iQuoteID int OUTPUT<BR><BR> AS<BR><BR>begin tran<BR><BR>INSERT INTO tQuoteID<BR> (<BR> Client_ID , <BR> Broker_ID , <BR> PolicyType_ID<BR> )<BR>VALUES <BR> (<BR> @Client_ID , <BR> @BrokerID , <BR> @PolicyTypeID<BR> )<BR> set @iQuoteID = @@Identity<BR><BR> -- update the quote id into the table<BR> UPDATE t_Motor SET Client_ID = @Client_ID , Broker_ID = @BrokerID , Quote_ID = @iQuoteID <BR><BR> thanks in advance<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: sql output parameter question

    SET NOCOUNT ON<BR><BR>before the INSERT statement.

Posting Permissions

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