Icon View Incident Report

Serious Serious
Reported By: Richard Harding
Reported On: 8/24/2009
For: Version 2.02 Build 15
# 3059 Adding the Same Table Twice to a SELECT Statement Using a Correlation Name Can Cause Error

The query below is generated from Report Builder. It puts a correlation name for each table in the FROM clause. "Client" appears in the FROM clause twice so the correlation names are "Client" and "Client_2" for the CLIENT table. When the query is executed, the following message is displayed.

ElevateDB Error #700 An error was found in the statement at line 7 and column 23 (Invalid expression "Client" AS "Client_2" found, duplicate table or table correlation name found).

I can make the SQL work by removing the correlation name "Client" from the first reference to the CLIENT table but I cannot make Report Builder do the same thing.

SELECT Client.ID, Client.LastName, Client_2.LastName LastName_2,
ClientPractitioner.PractitionerID
FROM ClientPractitioner ClientPractitioner
     RIGHT OUTER JOIN Client Client ON
    (Client.ID = ClientPractitioner.ClientID)
     LEFT OUTER JOIN Client Client_2 ON 
    (Client_2.ID = ClientPractitioner.PractitionerID)



Comments Comments and Workarounds
The workaround is as described.


Resolution Resolution
Fixed Problem on 8/25/2009 in version 2.03 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image