Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Select column names based on values in another table.

BobH90024Sep 2 2008 — edited Oct 7 2008
I'd like to generate a sql statement based on values from a table. For example, I'd like to run "Select division from tableA"

In the above example "division" would be a value of a column in TableB. Maybe looking like this.

Table B

Primary Key ColumnName
-----
-----
1234 Division
3456 Division
7890 Department

I would want to retrieve "Division" from Table B based on primary key = 1234 and then generate the above SQL.

Any ideas?

TIA
This post has been answered by 86140 on Sep 2 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2008
Added on Sep 2 2008
9 comments
1,287 views