Message Error

Charmed7

Registered User.
Local time
Today, 15:03
Joined
Jul 23, 2004
Messages
53
I am trying to Right Join two queries which are basically from the same exact table, but when I do that I get the following error.

ODBC--called failed.

[Microsoft][ODBC SQL Server Driver][SQL Server] The column prefix 'MS1' does not match with a table name or alias name used in the query. (#107).

The following is a copy of my SQL

SELECT PqryExpiredPolicy.Policy_Number, PqryExpiredPolicy.Orig_Exp_Date, PqryExpiredPolicy.Insured_Key, PqryNewPolicy.Policy_Number, PqryExpiredPolicy.Name
FROM PqryNewPolicy RIGHT JOIN PqryExpiredPolicy ON PqryNewPolicy.Insured_Key = PqryExpiredPolicy.Insured_Key;


I have looked for this MS1 and cannot find it. Any ideas where I should be looking or what this means?
 
Are PqryNewPolicy and PqryExpiredPolicy both tables, or queries?
 
They are both queries from the same table. One has an expiring date of 01/01/05-01/31/05 and the other has an expiring date of 01/01/06-01/31/06 to show if someone renewed their policy this year.
 

Users who are viewing this thread

Back
Top Bottom