Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: mrjoltcolaPosted on 2009-11-03 at 09:08:38ID: 25731090
>>I need the simple query to this. I dont want to use any cursors or procedures.
Given your requirements, I don't think you will find such a simple query.
Since the table names / suffixes are stored inside table rows, you cannot use that in any sort of dynamic join to query the data in one step.
You'll either have to use PL/SQL and a dynamic SQL (with execute immediate) or generate the SQL to a file or buffer with a "generation" query, then execute the result.
When you have requirements like this, it almost always indicates a design problem.