Joining More Than 2 Files

35 pts.
Tags:
Embedded SQL
SQLRPGLE
What is the best way to join more than 2 files using SQLRPGLE with embedded sql?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello

Someone already answered this question in the past. Here’s the link: Embedded SQL in SQLRPGLE using JOIN on multiple files.

Bye

======================================================

Unfortunately, that other answer doesn’t answer the question that is asked here.

There is no “best” way to do it. It always depends on what’s in the files, what you plan on selecting by (WHERE) and what you have available to join on in each of the files.

In short, you join using the same SELECT structure that you would use in any SQL client, use the best one for the task at hand.

Code the SELECT in STRSQL (or iNav Run SQL Scripts) to get some benchmarks to see if a choice of JOIN works well. If it does, then code it that way in RPG (or COBOL or C). If it doesn’t perform well enough in STRSQL (or whatever client), then run under debug (or SQL Explain or whatever feature is available to you) and implement the resulting suggestions until it’s acceptable.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following