5

How can I copy queries from Oracle SQL Developer with format. Unlike Toad the query format is lost as I paste it in any document.

I am referring to font formatting.

beaver
  • 523
  • 1
  • 9
  • 20
SaurabhD
  • 211
  • 1
  • 2
  • 6
  • If you are talking about retain the SQL syntax highlighting then, as far as I know, it is not possible with version 4.x. I usually take a snapshot of the screen and copy as an image, or use a third editor with its own syntax highlighting that let me copy as HTML or RTF (ultraedit, sublime text, ...) – acesargl Jul 14 '15 at 08:48

4 Answers4

2

Not (yet) supported in 4.x.

Your best shot is to vote/rate it up: "Copy to clipboard" should include HTML and/or RTF clipboard formats

As a workaround, if you really, really want it bad - you might try out long and tedious path of using "Print" option in color to some PDF printer, then copying it from there (some programs like Preview on Mac OS X preserve formatting while copying from PDF)

msciwoj
  • 772
  • 7
  • 23
1

There is an extension called "Copy As HTML/RTF". But version 4.x doesn't support extensions. Only 3.x and earlier versions support them.

Florin Ghita
  • 17,525
  • 6
  • 57
  • 76
0

if you are talking about Highlight Format, I can suggest you to use one plugin in Notepad++, which preserves the Font color as in Notepad++ when you copy to Microsoft Word. You can visit this site: Copy Notepad++ text with formatting?

Community
  • 1
  • 1
OscarSosa
  • 89
  • 1
  • 1
  • 6
0

SSMS has the same issue. With SSMS, it appears that there is a 10,045 byte limit. At 10,046 char/bytes, the sql format changes to text. There are two ways to resolve this issue that I know of so far.

  1. Select all the sql text in the query window, open the word doc, and drag the text over to word instead of copy/pasting it.

  2. Break your copy/paste text into sections less than 10,045 bytes and paste to word code section by code section. In other words, select sections of the sql text that are smaller than 10,045 bytes and copy/paste multiple times into word instead of the whole query at once.

Katherine
  • 1
  • 1