Ask the Expert

Extracting data from 30 tables using a join condition

I am extracting the data interface from Oracle SQL tables into flat files. I started writing code in one select statement to select multiple fields from multiple tables with a join condition. I am extracting the data from 30 tables, so I made 29 join conditions in the 'where' clause. When I execute the entire SQL code, I am getting one cartesian in the output. What do I do to avoid the cartesian, because I am anable to check the condition in the entire bulk of the code.

    Requires Free Membership to View

Can you send me the query so that I can tell you which condition you are missing that is making your query a cartesian product? Do you need to use all 30 tables? Can you tell me what the format is for the flat file and how they relate to the columns from the 30 tables? It is very difficult to answer the question without more specifics.

This was first published in October 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: