Copying Columns from Grid to Clipboard in SQL Developer


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.

WYSIWYG Grids, Hide Columns and Filter Rows

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.

You can export to the clipboard, yes you can!

Click ‘Next.’

Click in the Columns dialog, and choose the columns you want copied.

Trim the columns you don't want copied

Click ‘Finish.’

Alt or Ctrl tab to your window or application of choice.

And Paste!
"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 :)

Related Posts Plugin for WordPress, Blogger...

Similar Posts by Content Area: , , , ,