Home > Blockchain >  How do you include the borders in the query result when copying?
How do you include the borders in the query result when copying?

Time:12-31

Is there a way I can include the borders on the query result window, after copying the data. This would make my life a lot easier.

CodePudding user response:

It is possible, but takes a few steps. Instead of just copying the result,

  • right-click data grid (query result) and choose Export ...
  • set
    • format: html
    • save as: single file
    • file: any you want, e.g. c:\temp\result.html
  • finish

Navigate to destination folder (c:\temp in my example) and double-click the result.html file; it'll open in your default browser.

  • Ctrl A (to select all), Ctrl C (to copy it)
  • open e-mail client
  • Ctrl V (to paste clipboard contents)
  • select the whole HTML table, set the border

That's all.


Unfortunately, SQL Developer lacks TOAD's functionality which lets you export to HTML, but directly into clipboard (SQL Developer won't let you do that), so you just have to paste the result into e-mail message. Quite simple, takes only 3 steps (right-click query results; export into HTML format, into the clipboard; paste).

CodePudding user response:

sqldeveloper has an option for export to CSV. In the result window select your columns rclick => Export Results => To clipboard as => CSV file.

 SELECT 1 AS SOME_NUMBER, 'abc' AS RANDOM_STRING, 'dfg' AS ANOTHER_STRING, SYSDATE AS SOME_DATE
   FROM dual

"SOME_NUMBER";"RANDOM_STRING";"ANOTHER_STRING";"SOME_DATE"
"1";"abc";"dfg";"30.12.2021 20:00:06"
  • Related