Using ISQL with vi editor?
Posted in 1995
[...intro comments deleted...]
With all due respect, I'm not sure you've answered his question...
> >I was wondering if you can create something in vi (while in isql) and when
> >you exit vi, send whats in the vi buffer to isql to run?
>
> No--not at all. The escape is just an opportunity to run a command. ISQL has
> no idea what you've done.
What about the "use editor" menu option, and the DBEDIT environment
variable? This is either a stupid reminder or just what you're looking for.
You can use vi or another editor while in SQL this way.
>
> >Also, is there a way you can edit a SQL command you just sent to isql back
> >into vi?
>
> No -- not this either.
>
Well, sort of. There may be many ways. I often use this syntax:
$ echo "select * from tabname" | isql dbnameand then recall and edit the command line. This can also be done by
editing a file and catting it and piping it to isql. There is the "choose"
command in the SQL menu, doesn't that do what you want? If you use the
"save" option, bang out to vi, and then use the choose option does _that_
do what you want?
> >I use to do this in Sybase ISQL and would like to it in Informix.
[...stuff I don't know about deleted...]
>
> Yours,
> Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
I couldn't decide if the original question deserved this kind of obvious,
RTFM answer or a sophisticated program like jl uses. I still can't decide,
but here's my $0.02 anyway.
Maybe that helps...
__________________________________________________________________
| Clem Akins Standard Disclaimers Apply |
|Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" |
| Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com |
|________________________________________________________________|