General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem with Query Joins
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only