×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Single table - joined with "AS"

Single table - joined with "AS"

Single table - joined with "AS"

(OP)
I have the following SQL that works fine against MS-SQL Server but I can't for the life of me translate it to work on Pervasive.

SELECT
  F10."id",
  F10."type" As "Type",
  F10."ref" As "Reference",
  F12."related",
  F12."status",
  SWF."id" as SWFTid,
  SWF."ref" as "Other Reference",
FROM
  F10 INNER JOIN (F10 SWF JOIN F12 ON SWF."id" = F12."related") ON F10."id" = F12."f12id"

Scenario - table 1 (f10) with id field.  
Lookup the id field in another table (F12), and come back to table 1 and get the corresponding record.

I need to make it run agains a pvsw2000i SP4 set of tables.
The ddf's are all fine.

PCC seems to choke on the inner join lookups to the same table.

Is there any way to get this working.

Thank you!

RE: Single table - joined with "AS"

Well, what's the exact error?  
FROM
  F10 INNER JOIN (F10 SWF JOIN F12 ON SWF."id" = F12."related") ON F10."id" = F12."f12id"
The only thing that jumps at me is the part above that reads:
... JOIN (F10 SWF JOIN F12...
You've got two tables before the "JOIN".  I don't know that PSQL supports that.
You might change it to
... JOIN (SWF JOIN F12) ...

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close