Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2011
    Location
    Chennai
    Posts
    27

    Unanswered: how to get the tables involved in a query

    Hi,

    can anyone help.
    how to get the tables involved in a query?

    Thanks
    thawfii88
    Mohamed Thawfeek I

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Get the access plan for the query.

    Andy

  3. #3
    Join Date
    Nov 2011
    Location
    Chennai
    Posts
    27
    thanks, but i need only the table names(if one or more used) for my scripting purpose.
    I tried explain and its giving the tables involved, but i'm unable to grep the exact table names.

    Thanks
    thawfii88
    Mohamed Thawfeek I

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Is it dynamic or static SQL?

    Andy

  5. #5
    Join Date
    Nov 2011
    Location
    Chennai
    Posts
    27
    for both.

    thanks
    thawfii
    Mohamed Thawfeek I

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Dynamic: either access plan, or you can try the explain tables: IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

    Static: look in syscat.packagedep

    Andy

Posting Permissions

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