Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
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)

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
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap