Link to home
Create AccountLog in
Avatar of gs79
gs79

asked on

to remove line numbers in sql before executing in sqlplus

How to remove the annoying line numbers infront of sql script you obtained from somewhere else.

For example the sql scripts in tom kyte books have line numbers as shown below..so if you have to execute the sql in sqlplus you have to strip the line numbers first..

Is there a way to remove the line numbers using some command instead of removing each line number manually or is there some setting in sqlplus to ignore these line numbers?

please advice

thanks

eg :

create or replace package runstats_pkg
2 as
3 procedure rs_start;
4 procedure rs_middle;
5 procedure rs_stop( p_difference_threshold in number default 0 );
6 end;
7 /
Avatar of gs79
gs79

ASKER

One method I found was to use textpad editor and do a rectangular selection of the text without line numbers..
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of gs79

ASKER

Thanks for your response
I think its still ugly especially when the script runs 100's of lines- if the line numbers spill into 3 digits then it will involve lot of editing

Thanks
If you only have to do it once, it's still quicker than writing a program to do it.  Even at 3 digits, it's only 3 'column deletes' in PSPad.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account