Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Query Joins
Message
From
04/04/2000 20:44:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem with Query Joins
Miscellaneous
Thread ID:
00355406
Message ID:
00355406
Views:
54
Hi All,

I have a problem with the Query Designer. I have simplified the query for this question. Basically I am selecting every entry from a ledger file and then picking up descriptions for the transaction code and payment method from their master files. The correct number of records are being generated. The following code is generated by the designer but has 2 problems.

1. The query runs ok from within the designer but the field tcshorttxt contains the same data for every record. ie it doesn't match what transcode points to.

2. When closing and saving the query, I get the error message SQL: Column "TRANSCODE" is not found

If I reverse the Joins then the missing SQL column becomes "PAYMETHOD"

If I change the second join to a Where then everything works fine but I don't think we should be doing it this way! Any ideas?

PRE

SELECT Rteledgr.tsurname, Rteledgr.tinitials, Rteledgr.ttitle,;
Rteledgr.transcode, Rteledgr.paymethod, Paymeths.pmshorttxt,;
Trancode.tcshorttxt;
FROM rating!rteledgr INNER JOIN rating!paymeths;
INNER JOIN rating!trancode ;
ON Rteledgr.transcode = Trancode.transcode ;
ON Rteledgr.paymethod = Paymeths.paymethod

/PRE

TIA
Chris
Next
Reply
Map
View

Click here to load this message in the networking platform