Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL*PLUS Editor question...retrieving previous select statements 2

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
Do you know how you can print the buffer to the screen by typing 'list'? This pulls up the select (or whatever) statement. Is there a way to backup and pull down previous statements? I used to work in Unix all the time, and we used to type "history". This doesn't seem to work here.
Thanks for your help.
-Mike
 
SqlPlus does not keep a 'history' of previous entries in the Windows environment.( if you have a large enough screen buffer you can scroll back and 'cut and paste' previous statements, however.)



Try SqlWorksheet ( I believe it has a way to do this)

Ther are also 3rd party tools ( Like TOAD) that may have this ability..

[profile]
 
Actually, you can get the contents from the SQL*Plus buffer by using the L[IST] command in windows. The buffer will not hold all queries executed during the session, rather, the last query or procedure executed (I believe)

Just for extraneous information, / executes the contents of the SQL*Pluse buffer.
 
If you are accessing the db via a windows client, you can start sqlplus in a dos window (not sqlplusw) and then use the doskey up-arrow capability to bring back prior statements - the down side is that in dos you cannot cut and paste. Sometimes, though, this can be a useful technique.
 
Excellent!! If they can have that in DOS, why can't hey put it in SQL*Plus?? Hmmm....
 
I run SQL*Plus as a process inside my editor (Epsilon for Windows)which gives me full cut and paste, complete buffer listing, etc. Very useful setup.
 
You can't cut and paste in DOS but you can copy and paste. Also, if you're using the Windows GUI SQL*Plus then you can scroll up and down using the mouse or arrows keys and copy and paste anything that was displayed on screen (i.e. results or commands). The ONE ( HP-UX + Solaris + AIX + Tru64 = Unix)
 
That's a very interesting approach, Crufty. Can you do the same thing using MS Word or Notepad, or is it limited to your editor?
 
My editor is, basically, an emacs emulator (with extra goodies) for Windows. I am able to run a dos shell from within a process in the editor and ,then, I launch SQL*Plus.

Epsilon can be purchased for <100$ at :


I have no affiliation with the company, just a happy customer.

Very handy setup that has saved me a lot of time in the past couple of years.


Can you do this from Word or Notepad? I don't think so as I don't think they can launch a seperate DOS process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top