failed to open a rowset error message with Details 42000 error code

I am using Crystal Reports v10 with an ODBC connection.  I pulled two tables from the same database.  THe tables are Policy_E_P and Policy_R.  I basically want to display everything from the Policy_E_P table and then have the AgencyID and DwellingCvg values from the Policy_R table to be displayed where the common field is PolicyID in both tables.  The Policy_R table has more records per PolicyID than the Policy_E_P table and I don't want the totals to be effected in the Policy_E_P table which is why I just want to pull the values from the Policy_R table using WHERE

I used the following command in Crystal below and get the error msg below:
SELECT POLICY_E_P.*, POLICY_R.PolicyID, POLICY_R.AgencyID, POLICY_R.DwellingCvg
FROM POLICY_E_P, POLICY.
WHERE
POLICY_E_P.PolicyID =POLICY_R.PolicyID;

Error msg
Failed to open a rowset.
Details:42000: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'WHERE'.


what is the problem


rborghiniAsked:
Who is Participating?
 
SpykairCommented:
Remove the "." after "FROM POLICY_E_P, POLICY."

Spykair
0
 
rborghiniAuthor Commented:
Thank you that was exactly it
0
 
SpykairCommented:
Glad I could help.

Spykair
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.