Professional Web Applications Themes

Using a table function with a SET of parms? - IBM DB2

Hi, Given I have defined a TABLE udf of mytableudf(parm1) Is there a way of calling the table function for a SET of parm. values ? i.e once for each row of another select. e.g (conceptually, to aid understanding) SELECT * FROM TABLE(mytableudf(select col1 from ...)) as A or maybe get the Table function to call itself recursively? of maybe wrap the Table function inside another? Thanks. Paul....

  1. #1

    Default Using a table function with a SET of parms?

    Hi,

    Given I have defined a TABLE udf of mytableudf(parm1)

    Is there a way of calling the table function for a SET
    of parm. values ? i.e once for each row of another select.

    e.g (conceptually, to aid understanding)

    SELECT * FROM TABLE(mytableudf(select col1 from ...)) as A

    or maybe get the Table function to call itself recursively?

    of maybe wrap the Table function inside another?

    Thanks.

    Paul.
    Paul Reddin Guest

  2. #2

    Default Re: Using a table function with a SET of parms?

    Can you use a correlated join?

    SELECT ... FROM t1, TABLE(mytableudf(t1.col1))

    --
    __________________________________________________ ___________________
    Doug Doole
    DB2 Universal Database Development
    IBM Toronto Labs

    DB2 UDB v8.1 is available for AIX, HP, Linux, Solaris and Windows
    [url]http://www-3.ibm.com/software/data/db2/udb/v8/[/url]

    Visit the DB2 UDB and DB2 Connect Online Support site at:
    [url]http://www.ibm.com/software/data/db2/udb/winos2unix/support[/url]
    Douglas Doole Guest

  3. #3

    Default Re: Using a table function with a SET of parms?

    Yep,

    That works great!

    Thanks.

    Paul.

    Douglas Doole <dooleca.ibm.com> wrote in message news:<bkcfd1$oom$1hanover.torolab.ibm.com>...
    > Can you use a correlated join?
    >
    > SELECT ... FROM t1, TABLE(mytableudf(t1.col1))
    >
    > --
    > __________________________________________________ ___________________
    > Doug Doole
    > DB2 Universal Database Development
    > IBM Toronto Labs
    >
    > DB2 UDB v8.1 is available for AIX, HP, Linux, Solaris and Windows
    > [url]http://www-3.ibm.com/software/data/db2/udb/v8/[/url]
    >
    > Visit the DB2 UDB and DB2 Connect Online Support site at:
    > [url]http://www.ibm.com/software/data/db2/udb/winos2unix/support[/url]
    Paul Reddin Guest

Similar Threads

  1. coldfusion function for table length
    By stupidStan in forum Coldfusion Database Access
    Replies: 2
    Last Post: January 13th, 04:07 PM
  2. How to return a resultset/table from a sql function?
    By Joost Kraaijeveld in forum PostgreSQL / PGSQL
    Replies: 1
    Last Post: January 12th, 11:06 PM
  3. Jpeg size parms
    By LAphotoimage webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: January 22nd, 06:52 PM
  4. Passing Hash table to function?
    By Tushar Gokhale in forum PERL Beginners
    Replies: 3
    Last Post: January 20th, 02:17 PM
  5. data access in a udf table function
    By Knut Stolze in forum IBM DB2
    Replies: 6
    Last Post: July 30th, 09:48 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139