Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Assigning a variable to a table name in FROM statement ???
I want to get the number of datasets from a different tables, where table names are stored in a separate table.
Is it possible to assign the table name dynamically in the FROM-Part of the SELECT-Statement (as a variable), so can do this with a loop.
I thought of something like this, but it doesnt work:
DECLARE
actual_scheme_name VARCHAR(30) := 'students'; actual_table_name VARCHAR(30) := 'adresses'; number_of_datasets_entered NUMBER(10) := 0;BEGIN
INTO number_of_datasets_entered
FROM actual_table;
Thank you,
Bernhard
-- _____________________________________________________________ NewsGroups Suchen, lesen, schreiben mit http://netnews.web.deReceived on Mon Apr 09 2001 - 07:24:13 CDT
![]() |
![]() |