Forum Replies Created

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

  • RE: Based on @error how to omit SQL err msg

    Yeap. You are right. There are two options

  • RE: Based on @error how to omit SQL err msg

    Hoo,

    tmpCDR_Hold_Table is a temporary storage for any data that EXECUTE sp_executesql @resQuery returns. @resQuery is the one that might retun invalid table name, so it has to be where it is...

  • RE: Row Count of Insert stmt with sp

    Thank You. Yes you are right I just newbie. I should have checked sproc myslef not on online books.

  • RE: Row Count of Insert stmt with sp

    I found the answer myself. Here is to everyone to share:

    INSERT INTO tmpCDR_Hold_Table EXECUTE sp_executesql @resQuery SELECT @errCode = @@Error, @rCounter = @@Rowcount

  • RE: Row Count of Insert stmt with sp

    You mean:

    INSERT INTO tmpCDR_Hold_Table EXECUTE sp_executesql @resQuery, @@Rowcount, @@error

    sp_executesql only takes sp_executesql [@stmt =] stmt

    However this works: INSERT INTO tmpCDR_Hold_Table EXECUTE sp_executesql @resQuery SET @rCounter = @@Rowcount SET @errCode =...

  • RE: Row Count of Insert stmt with sp

    David,

    INSERT INTO tmpCDR_Hold_Table Exec( @resQuery) SET @rCounter = @@Rowcount

    It worked. Thanks a lot. That IF statement was messing around, I didn't know that it affects.

     

  • RE: Query temp Table with Like

    Thanks for reply.

    Thats the first time I see wildcard used this way. Very interesting.

    Here is the query that I have:

    SET @lrgtblNAme = 'mdCallAttempt' + @year + @month

    SET @resQuery =...

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