Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  Buy Now
  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
Heng Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

Problem with views which have join and complex 'ON' condition
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 Table name B has been declared more than one time in a same statement.
Error Code:212992
SQL State:34000
at 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

Thanks in advance,

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


Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap