By Katsumii-Oracle on Aug 23, 2013
Copy & paste multi-line SQL from sqlplus in one PuTTy window to another putty window is clumsy
because, as you see below, real SQL text is prefixed by line#.
Here's example#1. You can suppress line# by "set sqlnumber off" , though.
SQL> create table t
3 select object_name ename,
4 mod(object_id,50) deptno,
Here's example#2. "set sqlnumber off" won't help.
, wkts, average
You can copy&paste to notepad and edit but there's quicker way on Windows if Cygwin is installed.
After hitting Ctrl+C, go to bash prompt and ...
$ cut -c6- /dev/clipboard >/dev/clipboard
Now, Ctrl+V will paste SQL statements with line numbers removed.
You can use 'sed' also and be more creative.
Or if you don't have bash prompt open, you can use Windows "Run..." prompt.
I'm sure there's similar way for Mac OS.