Copying Results from Query

  • Hello SQL World,

    I'm noticing that when I copy results from a query result set by right clicking and selecting all, and then copy with headers into excel, the copy isn't copying all the results when I paste. I lose about 50-60 record rows.

    Is this a glitch or a setting that needs to be altered? I don't think I ever had this problem before and I'm usually running ad-hoc queries a lot I rely on coping and pasting. I know the save to file feature is there but I'm curious on why the copying and pasting stopped working.

    Thanks
    M

  • Marv_SQL - Tuesday, April 17, 2018 9:11 AM

    Hello SQL World,

    I'm noticing that when I copy results from a query result set by right clicking and selecting all, and then copy with headers into excel, the copy isn't copying all the results when I paste. I lose about 50-60 record rows.

    Is this a glitch or a setting that needs to be altered? I don't think I ever had this problem before and I'm usually running ad-hoc queries a lot I rely on coping and pasting. I know the save to file feature is there but I'm curious on why the copying and pasting stopped working.

    Thanks
    M

    What do you get if you click one cell in the results, press CRTL+SHIFT+A and then paste to the spreadsheet?
    😎
    Another option is to safe the results to a file, few options there.

  • Marv_SQL - Tuesday, April 17, 2018 9:11 AM

    Hello SQL World,

    I'm noticing that when I copy results from a query result set by right clicking and selecting all, and then copy with headers into excel, the copy isn't copying all the results when I paste. I lose about 50-60 record rows.

    Is this a glitch or a setting that needs to be altered? I don't think I ever had this problem before and I'm usually running ad-hoc queries a lot I rely on coping and pasting. I know the save to file feature is there but I'm curious on why the copying and pasting stopped working.

    Thanks
    M

    This could be that the actual copy was not quite complete before you pasted.   If your computer is bogged down with resources, or SSMS has a rather larger result set that you are trying to copy, that can happen.    And you may never know until you compare the results later...   One piece of advice here is to consider saving the larger result sets to a file, as opposed to relying on copy/paste, or, wait an extra 30 seconds after you do the copy, and then do the paste.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 3 posts - 1 through 2 (of 2 total)

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