By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

query the results of a table function applied to all the rows of a different table

P: 2
I have two tables:

book_table, primary key book_key.
book_authors, foreign key book_key

the function get_book_authors returns a set of rows from the book_authors_table given a book_key. Here's a sample query:

Expand|Select|Wrap|Line Numbers
  1. select * from get_book_authors(3);
Now let's say that I have a third table, book_store, which has a primary_key book_store_key. The book_table references this table.

I'd like to get all the book_authors for a particular book_store, or for all the books in the book_table.

I tried
Expand|Select|Wrap|Line Numbers
  1. select book_key,get_book_authors(book_key) from book_table;
but it's been deprecated as of 8.1.

Any ideas on how to do this?
Thanks
Aug 28 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 534
Deprecated functions still work, but personally I would write a new function or SQL query for this.
The obscure syntax of mixing function call with a regular "select from" is not something I would normally use in the application.
Aug 30 '07 #2

P: 2
Ok, thanks. I was just curious whether this could be done with a single query.
Aug 31 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.