Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 PL/SQL for Variable Table Names in Queries

Author  Topic 

Dylan79
Starting Member

1 Post

Posted - 2005-05-26 : 16:39:22
I'm new to using PL/SQL (just started using it yesterday).

I have a table that contains a list of tables and corrosponding columns. IE

Table_Name Column_Name
Table1 Column1
Table1 Column2
Table2 Column3
Table3 Column5

I need to perform queries on the tables/columns listed in this table. I think I've figured out that I need to use a refrence cursor to do this, but don't know where to start. I already have a cursor that will read individual rows and store the values in v_table_name and v_column_name variables. No I just need to be able to use these variables to do my other queries.

Anybody have any advice on where to start or how I go about doing this?

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-05-26 : 18:03:38
You are probably better off posting this over at www.dbforums.com in their Oracle section. SQLTeam is primarily focused on SQL Server (and mysql ) questions.



-ec
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-05-26 : 18:13:16
>>(and mysql)
What's that, is it a database ???

rockmoose
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-05-26 : 20:33:17
Is it better than SQL Server? Someone told me it is.

quote:
Originally posted by rockmoose

>>(and mysql)
What's that, is it a database ???

rockmoose



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -