If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > NEED Help DB2 UDB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-03, 11:32
ashok2318 ashok2318 is offline
Registered User
 
Join Date: Jul 2002
Location: Kentucky
Posts: 12
NEED Help DB2 UDB

Hi
I am in DB2 command prompt in Unix written some Sql. Now i want to modify this Sql using "vi" is there any way to take sql command (or this buffer) in the "vi" modify and run it again without exiting isql prompt.
like we have in sybase and oracle too.

Thanks
Ashok
Reply With Quote
  #2 (permalink)  
Old 11-19-03, 11:58
quigleyd quigleyd is offline
Registered User
 
Join Date: Nov 2002
Location: Delaware
Posts: 186
Copy it into a file and do db2 -vtf filename will run it and this way you can edit it as much as you want
Reply With Quote
  #3 (permalink)  
Old 11-19-03, 14:18
ashok2318 ashok2318 is offline
Registered User
 
Join Date: Jul 2002
Location: Kentucky
Posts: 12
Quote:
Originally posted by quigleyd
Copy it into a file and do db2 -vtf filename will run it and this way you can edit it as much as you want
Hi
Copy to a file i know but i am looking for something like Sybase has and you don't need to exit the sql session.

Thanks.
Reply With Quote
  #4 (permalink)  
Old 11-19-03, 14:57
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Can't you open anther session to do the editing?
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 11-20-03, 16:05
tmullins tmullins is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
in db2 v8.1.2

there are several clp commands for this -

edit - edit the last sql stmt
history - show history of sql/db2 commands
runcmd - run sql/cmd # from history output
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On