Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.202
  Buy Now
  HXTT Cobol 5.0.202
  HXTT DBF 7.1.203
  HXTT Excel 6.1.206
  HXTT Json 1.0.174
  HXTT Paradox 7.1.202
  HXTT PDF 2.0.202
  HXTT Text(CSV) 7.1.202
  HXTT Word 1.1.202
  HXTT XML 4.0.203
Offshore Outsourcing
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 Xing Tian Tai Lab of Xi'an 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 © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap