Error in Query

Visual studio reports error, cannot find reason.

Page 1 of 1

2 Replies - 1120 Views - Last Post: 10 October 2007 - 11:41 AM Rate Topic: -----

#1 RayAtCafeVittoria  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-September 07

Error in Query

Post icon  Posted 10 October 2007 - 08:03 AM

I am using Visual Studio Professional to create reports pulling data from an Oracle Database
I Added a datatable in my dataset via right click. I configured the Fill command using the Query Builder. In the query builder I added all of the relevant tables. The system generated the following Query. If I execute the query in the query builder it works perfectly, but when I try to save I get the following error. :blink:

Quote

Wizard Results
The wizard detected the following problems when configuring the TableAdapter: "DataTable3":
Generated SELECT statement.
Syntax Error: Expecting '.', identifier or quoted identifier.


Here is the query.... Yes I know it is huge, but... It is what is needed.

SELECT  ITEM.ITEM_NO, ITEM_DESC.LANG_NO, ITEM_DESC.DESCR, ZZVITTO_PRODUCTION_LINE.ORDER_COMPLETE, ZZVITTO_PRODUCTION_LINE.SALESORDER_NO, 
			   ZZVITTO_PRODUCTION_LINE.ORDER_NO, ZZVITTO_PRODUCTION_LINE.PRODUCTION_LINE, SOORDER_HD.SEQ_NO, SOORDER_HD.BILL_NAME, 

PCORDER_HD.QTY_REQ, PCORDER_HD.QTY_PRODUCED, ZZVITTO_WZ_CAFE.ITEM_CAFE, 
ITEM_DESC_1.DESCR AS COFEEDESC
FROM	 SOORDER_HD INNER JOIN
			   PCORDER_HD ON SOORDER_HD.SEQ_NO = PCORDER_HD.SRC_SEQ_NO INNER JOIN
			   ITEM INNER JOIN
			   ITEM_DESC ON ITEM.ITEM_NO = ITEM_DESC.REF_NO INNER JOIN
			   ZZVITTO_PRODUCTION_LINE ON ITEM.ITEM_NO = ZZVITTO_PRODUCTION_LINE.ITEM_NO ON PCORDER_HD.ORDER_NO = ZZVITTO_PRODUCTION_LINE.ORDER_NO INNER JOIN
			   ZZVITTO_WZ_CAFE ON ITEM.ITEM_NO = ZZVITTO_WZ_CAFE.ITEM_NO INNER JOIN
			   ITEM ITEM_1 ON ZZVITTO_WZ_CAFE.ITEM_CAFE = ITEM_1.ITEM_NO INNER JOIN
			   ITEM_DESC ITEM_DESC_1 ON ZZVITTO_WZ_CAFE.ITEM_CAFE = ITEM_DESC_1.REF_NO
WHERE  (ITEM_DESC.LANG_NO = 'F') AND (ITEM_DESC_1.LANG_NO = 'F')


If anybody has sharp enough eyes to spot the glitch or is aware of a bug in Visual studio.. (and of course how to get around it) I would be eternally gratefull for your help.

Ray

Is This A Good Question/Topic? 0
  • +

Replies To: Error in Query

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,127
  • Joined: 18-April 07

Re: Error in Query

Posted 10 October 2007 - 10:18 AM

Apparently there is a problem processing the INNER JOIN command when using 2005 to connect to Oracle. However there is a fix provided by microsoft. You can find it here..

Fix: FIX: Error message when you add a TableAdapter control that connects to an Oracle database in Visual Studio 2005: "Syntax Error Expecting '.', identifier or quoted identifier"

I also understand that if you use the where clause and "=" instead of INNER JOIN it will work fine. You can try one or the other but one should fix your problem.

Enjoy! :)
Was This Post Helpful? 0
  • +
  • -

#3 RayAtCafeVittoria  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-September 07

Re: Error in Query

Posted 10 October 2007 - 11:41 AM

Wooohoo.. dat should do it. Now I just have to wait for Microsoft to send me the hotfix. :D

Thanks a bunch Martyr2

Ray
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1