Re: 'Simple' Function or Procedure w/SELECT
Date: Wed, 1 Jun 1994 23:44:25 GMT
Message-ID: <sreiss.25.2DED1D59_at_wpo.borland.com>
Magnus,
>You can not do this. You can only use bind-variables (or PL/SQL variables)
>in place of column-names, expressions or constants in the select-list,
>where clause, order by, group by, etc, etc. You can not have a variable
>table name.
Thanks for the info! OK, I can't have a variable tablename. How about a procedure that returns multiple rows, maybe based on a variable passed in to search on a field?
Something like :
function SelectSomeRows(IDVal number)
select * from customer
where Cust_ID = IDVAL
I'm looking for any simple way of returning multiple rows back to the client. Can a function be executed with a SQL statement? Like this :
EXECUTE SelectSomeRows(123)
+-------------------------------------------------------------------------+ * ------------ %------- Steve Reiss + . ------------ __________ --%%------- sreiss_at_wpo.borland.com . ------------ | |____| | ----%%_------ cis: 76424.1007 . ----(_)----- |--------| -----(_)----- + ------------ |--------| -------%%---- B O R L A N D
. ------------ |-||||||-| -------%%-- International
- ------------ |_||||||_| --------% Scotts Valley, CA
+-------------------------------------------------------------------------+Received on Thu Jun 02 1994 - 01:44:25 CEST