Help with a table join

JWaldrup

New Member
Hello. I apologize if this is the wrong forum, but I think this is the best fit - so here goes.

I am a M$ SQL Server guy that has ran into a customer with an application that runs on a Progress 9.1D backend. I need a query that does a simple left join. The SQL Server version would be:

Code:
SELECT membership.m-acct-no, membership.m-email, profile.p-lname, profile.p-fname, profile.p-hphone
FROM membership
LEFT JOIN profile ON (membership.member-no = profile.member-no)
WHERE membership.somefield = somevariable

I have figured out the syntax to pull the data from a single table such as:

Code:
SELECT "m-account-no"
FROM PUB.membership
WHERE "guest-no" = 1

So I am slowly figuring out the different syntax, but this table join is a killer. Any help? Thanks in advance. :)
 
PEG is a lot more active. If you need a quick response you'll fare better at www.peg.com.

Are you trying to use SQL-92 (perhaps via ODBC or JDBC) or are you running this query inside the 4GL interpreter?

If you're inside the 4GL don't use SQL. 4GL SQL is SQL-89 and deprecated. The natural thing to do in the 4GL is more along the lines of:

Code:
FOR EACH membership NO-LOCK
      WHERE membership.somefield = somevariable,
      EACH profile NO-LOCK
      WHERE profile.member-no = membership.member-no:

  /* do something with the records */

END.
 
Sorry for my ignorance on the product at hand. I am using SQL Explorer to test the query, which is using JDBC. Ultimately I will be connecting via ODBC and the MERANT driver from another system to pull data into another application.
 
Not wanting to discourage you on the whole using-sql-with-progress thing, but there is a documented issue whereby issuing a left join shuts down the database server.:eek:

That is recorded for HPUX though (Knowledgebase P75907).

Bear in mind that most Progress developers use the 4GL. Try sql92@peg.com for more input (crosspost).
 
Back
Top