HomeActive Query BuilderDB2SyntaxProvider: Problem with Adding alias in FROM-clause

DB2SyntaxProvider: Problem with Adding alias in FROM-clause


Detected in: ActiveQueryBuilder Version 1.7.9.48 Standard Edition

If you extend the from-clause e.g. "employee e1" by adding the expression 'as'
directly in the sql-Memotext then DB2SyntaxProvider will automatically change the where-clause and the select-clause. But in this case DB2-Syntax-Provider will produce an invalid syntax.

Example:

1. Start with this query and display the table in QueryBuilder:

Select E1.EMPNO
From employee E1
Where E1.EMPNO = '000010'

2. Add the expression 'As' to the from-clause in the sql-Memo

3. display the table in QueryBuilder. Now DB2SyntaxProvider will generate the following (invalid) syntax:

Select As E1.EMPNO
From employee As E1
Where As E1.EMPNO = '000010'
Steiger | email
September 4 2007, 04:10 PM
Dear Steiger,

Thank you for your bug report. This bug is already fixed. The updated build will be released shortly. We'll let you know when it will be available for download.
Sergey Smagin | email
1 week since original post
I am glad to inform you that the new version is available for download now.
Sergey Smagin | email
1 week, 2 days since original post
Retested in Version 1.7.9.49.

Above mentioned problem is fixed now, but
I noticed another problem when I change
the alias in the sql-Memo.

1. Start with this query and display the table in QueryBuilder:

Select
E1.EMPNO
From
employee As E1
Where
E1.EMPNO = '000010'

2. Change the alias E1 in the from-clause to E2 directly
in the sql-Memo

3. Display the table in QueryBuilder. The query now looks like this:

Select
E1.EMPNO
From
employee As E2
Where
E1.EMPNO = '000010'

The prefix E1 in the select-clause and in the where-clause did not change.
(you will notice that this problem also exists if you don't use the "as" expression for the alias).


Steiger | email
1 week, 3 days since original post
This topic is closed