Results 1 to 3 of 3

Thread: view definition

  1. #1
    Join Date
    Jul 2008
    Posts
    131

    Unanswered: view definition

    Hi,
    I am using db v9.5 ESE on windows.

    Default View 'Snapappl_info' defined while creating database is defined as:
    CREATE VIEW SYSIBMADM.SNAPAPPL_INFO (snapshot_timestamp, agent_id, ...) AS SELECT snapshot_timestamp, ..., is_system_appl FROM TABLE(SYSPROC.SNAP_GET_APPL_INFO_V95('')) as T

    but i can find no table with name this view is using, so where is the information in view being fetched from?

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by nittal
    ... TABLE(SYSPROC.SNAP_GET_APPL_INFO_V95(''))
    SNAP_GET_APPL_INFO_V95() is a so-called table function: it returns a table.
    That explains the keyword TABLE: "from" expects a table/view/nested select, not a function.
    Since that function is in the SYSPROC schema, it should be documented in the DB2 SQL manuals under the section "table functions". (Didn't verify, though.)
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  3. #3
    Join Date
    Jul 2008
    Posts
    131
    thanks peter!

Posting Permissions

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