[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1698
  • Last Modified:

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


0
rborghini
Asked:
rborghini
  • 2
1 Solution
 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now