Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2007
    Posts
    288

    Unanswered: DB2 V9 Command Editor

    Is there any way to get the Command Editor results in a file instead of on the screen??

    I'm trying to do a list tables for all so I can send it to some people for cleanup but the results indow does not cut and paste very clean!!!????

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    How about using a Command Window and redirecting the output to a file?

    Andy

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Tools ---> Tools Settings ---> (Select tab)"Command Editor" ---> (Check) "Log output to file" & Put file name

  4. #4
    Join Date
    Mar 2008
    Posts
    136
    db2 list tables for all>list_tables.txt

    you can save output like above.....will not display on command prompt....

  5. #5
    Join Date
    Dec 2007
    Posts
    288
    Thanks! no way to save it to a more workable format like .cvs ????

    or alternatively... is there a way to list tables just for one schema..

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You can also do this:

    export to table.csv of del select tabname from syscat.tables where tabschema = MYSCHEMA"

    Andy

  7. #7
    Join Date
    Dec 2007
    Posts
    288
    Thanks I'll give it a shot : )

  8. #8
    Join Date
    Dec 2007
    Posts
    288
    Code:
    export to table.csv of del select tabname from syscat.tables where tabschema = "KCDWHDUT";
    can anyone help with the syntax on this?

  9. #9
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Use single quotes instead of double quotes.

    Andy

  10. #10
    Join Date
    Dec 2007
    Posts
    288
    Worked like a charm!! Thank you~!

  11. #11
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Just remember: all string literals in SQL are denoted with single-quotes. Double-quotes are used for delimited identifiers (table/column/schema names) if those names are to be treated as mixed-case or contain special characters.

    That's standard SQL stuff and not specific to DB2.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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