Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT ACCESS
Problem with views which have join and complex 'ON' condition
Nikita
2007-09-05 01:29:36.0
I came across a problem with view which can be demonstrated on this example:

Table A: int a, int b

Table B: int c, int d

View view_ab: SELECT A.*, B.* FROM A LEFT JOIN B ON (A.b=B.d) AND (A.a=B.c);

HXTT Access throws an exception while executing query: SELECT * FROM view_ab

Table name B has been declared more than one time in a same statement.java.sql.SQLException: Table name B has been declared more than one time in a same statement.
Error Code:212992
SQL State:34000
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.dc.a(Unknown Source)
...

The cause of the problem is a complex condition in 'ON' clause: (A.b=B.d) AND (A.a=B.c), because there is no error when it is changed to A.a=B.c .

Also the underlying query of the view is executed by HXTT without any problem. So, something is wrong only with views.


Is there any solution to this problem?

In this particular case I don't see any possibility to rewrite query. Moving condition to 'WHERE' clause will change the logic of LEFT JOIN

The test case is uploaded onto your ftp as view_ab.zip

Thanks in advance,
Nikita

Re:Problem with views which have join and complex 'ON' condition
HXTT Support
2007-09-05 04:46:26.0
Supported. That's resulted by MS Access stored two ON expressions in different place so that HXTT Access thought it's "SELECT A.*,B.* FROM (A LEFT JOIN B ON A.a=B.c) LEFT JOIN B ON A.b=B.d;" The next latest package will be release after about 48 hours.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap