There are several ways to get data from a query or a table|view to the clipboard. You know the tried and true, copy and paste. But what if you only want one or more columns, not every column? There are several ways to do this, let’s see if we can’t identify all of them.
Write your query to only include the data you want
Obvious? Yes. Needed to be said? Definitely. The best tuning tip is to only ask for the data you need, only when you absolutely need it. But let’s look at a few more practical ways to do this.
Hide the unwanted columns
Mouse right click on an column header. In the context menu, select ‘Columns.’ Hide the columns you don’t want. Copy and paste.
Mouse select the columns
Obvious, but a bit painful. For a very large dataset, you’ll be holding down the Shift and PageDown buttons – but it works. Remember to use Ctrl+Shift+C to get the column headers with the data.
Use the Export Wizard
This used to be called ‘Unload’ – agreed, not a great name. So, we changed it.
In a grid, right mouse click on the data, and on the context menu, select ‘Export…’
Select your format – I suggest ‘delimited’ or ‘fixed’ for copying data to the clipboard.
Click ‘Next.’
Click in the Columns dialog, and choose the columns you want copied.
Click ‘Finish.’
Alt or Ctrl tab to your window or application of choice.
And Paste!
"FIRST_NAME" "LAST_NAME" "Donald" "OConnell" "Douglas" "Grant" "Jennifer" "Whalen" "Pat" "Fay" "Susan" "Mavris" "William" "Gietz" "Alexander" "Hunold" "Bruce" "Ernst" "David" "Austin" "Valli" "Pataballa" "Diana" "Lorentz" "Daniel" "Faviet" "John" "Chen" "Ismael" "Sciarra" "Jose Manuel" "Urman" "Luis" "Popp" "Alexander" "Khoo" "Shelli" "Baida" "Sigal" "Tobias" "Guy" "Himuro" "Karen" "Colmenares" "Matthew" "Weiss" "Adam" "Fripp" "Payam" "Kaufling" "Shanta" "Vollman" "Kevin" "Mourgos" "Julia" "Nayer" "Irene" "Mikkilineni" ...
There’s probably at least 2 or 3 more ways, but…
But, try these and let me know how we can improve things.
I’ve already gotten a request to be able to include the SQL text used to populate the dataset on the the copy to clipboard, and it’s now on our to-do list




Twitter
RSS
GooglePlus
Facebook
Jun 07, 2012 @ 08:34:34
Cool. I had used the export wizard before but missed the little edit icon for selecting columns.
Thanks Jeff!
Jun 13, 2012 @ 05:23:23
I’m using ctrl + c to copy multiple columns…. but then in Excel it pastes all into one column.
This started when I changed my pc from xp to Win 7… any ideas? It’s driving me insane.
Jun 13, 2012 @ 05:29:33
I found the answer here: http://www.computing.net/answers/office/microsoft-excel-copy-and-paste-problems/11036.html
Jun 13, 2012 @ 08:46:10
Hi Monika, thanks for sharing your question and supplying your own answer! I’m wondering what you did to work around your issue? Did you use the text – column trick suggested on that link? I use OpenOffice, and when I do a paste into a spreadsheet it shows the data coming over on the clipboard as tab delimited.
Jun 13, 2012 @ 08:50:02
I used the last method suggested, ie pasting the data (in the one column) then doing text-columns as tab delimited. Now, whenever I paste it puts the data in columns *happy dance*