Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Time For A View?

    Thank you. I think I am on the right track now. I wasn't familiar with the OUTER JOIN syntax for MSSQL. Coming from Oracle and Sybase the...

  • RE: Raising Error from Procedure

    GilaMonster (9/4/2009)


    I think part of the question is why an explicit transaction for a single update?

    You could remove both the ROLLBACK and the RETURN and not change the behaviour, nothing'll...

  • RE: Raising Error from Procedure

    Bob Hovious (9/4/2009)


    Three comments.

    1. Get in the habit of first storing @@ROWCOUNT in an integer variable. ( I use @rc. ) Do this...

  • RE: Raising Error from Procedure

    Thank you! This seemed to work for me.

    ALTER PROCEDURE [dbo].[updateLastName]

    (

    @userid varchar(7),

    @lastname varchar(15)

    )

    AS

    BEGIN TRY

    BEGIN TRANSACTION

    UPDATE dbo.USER_TBL SET lastname = @lastname WHERE userID = @userid

    IF @@ROWCOUNT = 0

    BEGIN

    ROLLBACK...

  • RE: Raising Error from Procedure

    Thank you very much Gail. I have updated as follows but like you said the UPDATE is not generating an error since no rows were affected? Is there...

  • RE: Stored Procedures Problems

    Thank you and Alexander! Found some logical errors too. I think i've got it now based on your feedback.

    BEGIN

    -- SET NOCOUNT ON added to prevent extra result sets from

    --...

  • RE: Stored Procedures Problems

    Thank you very much! That was a problem. Here is the entire listing. I am getting the message again once I added the [ELSE] condition. ???

    ALTER PROCEDURE [dbo].[sp_qcentricLogin]

    (

    --...

Viewing 7 posts - 1 through 7 (of 7 total)