We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

I get SQl error 42P01while executing a Sql query in Crystal Reports XI

ReddyUD
ReddyUD asked
on
Medium Priority
695 Views
Last Modified: 2012-05-06
I am trying to create a report through SQL in crystal reports XI and the databass is postgresSQL, but I get an error:
Failed to retrieve data from the database.
Details: ADO Error Code: 0x80004005
Source: Microsoft OLE DB Provider for ODBC Drivers
Description: ERROR: relation"tablename" doesnot exist;
error while executing the query
SQL State: 42P01
Native Error" 7 [Database Vendor Code:7]

The query runs fine, when I run it through Postgres studio.

I would appreciate if somebody could help me with this issue
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
What is the query?

How are you adding it to the report?

mlmcc

Author

Commented:
below is the query:
SELECT "aoadorder"."adordernumber", "aoadorder"."id", "ss_adorder"."discountcodeid"
 FROM  "aoadorder" "aoadorder" INNER JOIN "ss_adorder" "ss_adorder" ON "aoadorder"."id"="ss_adorder"."adorderid"
 AND "ss_adorder"."discountcodeid" ='2'

I selected "create new connection" then "OLE DB (ADO)" then my database and clicked on "add command" where I wrote the above sql query.
And the database is PostGres

Thank you
Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
Try taking the " out.

mlmcc

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.