Joining tables in PL/SQL

It has long been established that SQL was designed to fetch data whole PL/SQL was intended for doing the processing against the data.  However, there has been a great debate in the industry whether SQL should be extended to deploy analytic functions.

- SQL:  As SQL evolves toward a true programming environment (e.g. with CASE statement, the WITH clause) many complex processing tasks can be done without PL/SQL.

- PL/SQL:  The PL/SQL language is tightly-coupled with Oracle, and the question becomeds whether to perform a task in PL/SQL or SQL.

Joining tables:  SQL or PL/SQL?

There are many ways to join data sources in Oracle and some experts recognize that it is possible to join tables together in both SQL and PL/SQL.

In a nested loops join, diverse array data can easily be merged in PL/SQL to simulate an Oracle table join:

Here is pseudocode that mimics what a nested loop join is doing:

for x in ( select * from T1 )
loop
     for y in ( select * from t2
                where t2.joins = t1.joins )
     loop
          output records
     end loop
end loop

Read below, details on how to join tables together in PL/SQL without using SQL:

http://www.dba-oracle.com/t_plsql_join_tables_together.htm



*****************************************

Need a Health Check?

Oracle is the world's most complex and robust database and there are hundreds of sub-optimal settings that can cripple your database performance.

Burleson Consulting has a great Oracle health check where we identify all database bottlenecks to ensure that your mission critical system is running at optimal speeds.

Just call 800-766-1884 to schedule your health check.

*****************************************

Need Oracle Training?

The very best Oracle training comes from Burleson Consulting, where you get an on-site visit by an experienced Oracle expert and author. Whether it's one-on-one mentoring or getting a customized on-site Oracle training class, there is no substitute for BC Oracle training. Just call 800-766-1884 for details, and check out our on-site Oracle training catalog at the following link:

http://www.dba-oracle.com/bc-catalog.pdf 

*****************************************

BC is seeking part-time  experts

Burleson Consulting continues to grow as the Oracle community recognizes that high quality Oracle support and training is a cost effective option in these tough economic times.

If you have distinguished yourself in your Oracle career and are ready to step up and enjoy the rewards of joining the ranks of America's top tier support consultants we would like to hear from you.

Evidence of high achievement as an Oracle professional might include publication of books and articles for the Oracle community, achieving an advanced degree from a competitive university and seeking out hands-on experience with complex databases. See here for details and a full qualifications list:

http://www.dba-oracle.com/jobs.htm