Update statement bringing unexpected results.

  • I have a simple update statement (see example below) that when runs, I expect to see the number of records updated in the Results tab. This information shows up in the Messages tab; however, what is displayed in the Results tab is (No column name) 40. I have no idea from where the 40 is being generated. Any thoughts? So far, I have tried restarting SSMS 2012, restarting my computer, turning NOCOUNT on and off.

    "UPDATE TableA

    SET Supervisor = 'A123'

    WHERE PersonnelNumber = 'B456'"

    Thanks

  • Could be a trigger? Nothing else is immediately coming to mind.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • As far as the number of records showing up in the messages tabs is concerned, that's the way it should be.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Yeah, sorry, should have commented on that. The messages sound perfectly correct.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • It turned out there was, indeed, a trigger on the table. Thanks for the help, everyone.

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

You must be logged in to reply to this topic. Login to reply