Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    12

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    12
    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.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •