Can't copy/paste from results window in SS Management Studio

  • Hi all,

    Have a query that returns just under 200,000 rows which I'm unable to copy to the paste buffer.

    If I right click in the results pane, select all then do a copy I get the following error.

    TITLE: Microsoft SQL Server Management Studio

    ------------------------------

    Exception of type 'System.OutOfMemoryException' was thrown. (mscorlib)

    Any ideas how to get around this?

    I've tried this on two PCs and the live server which has 12gb of memory and 16 processors - no luck

  • What's your intended destination of these 200,000 rows? One option may be to right click on the resulting data and select "Save Results As...". Another option is to use the "Results to File" option, there is a button n the SQL Editor toolbar.

  • if your intentions are only to export results of query to text file, why don't you use SQL Server Import Export Wizard or BCP. Using either of these two will give you better options of selecting type of output file, column and row delimeters, text qualifiers, column datatypes and even different column names as compared to table column names.

  • Hi,

    thanks to all who responded.

    I needed these records in a flat file on a VMS box which does not support unicode.

    In the end I exported the view to a table and then exported the table to a flat file

    which (after a bit of formatting) is usable on the VMS server.

    I quite forgot about BCP, that probably would have done what I needed without any fuss.

    Cheers

    Dave

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

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