Watch, Follow, &
Connect with Us
Public Report
Report From: InterBase/SDK/IBX    [ Add a report in this area ]  
Report #:  8992   Status: Closed
TIBQuery Result Set ignores JOIN
Project:  InterBase Build #:  Delphi Pro 7.0
Version:    7.0 Submitted By:   Stuart McKenzie
Report Type:  Basic functionality failure Date Reported:  9/7/2004 8:18:06 AM
Severity:    Serious / Highly visible problem Last Updated: 9/8/2004 10:24:58 AM
Platform:    Windows 95/98/NT 4.0 on Intel Internal Tracking #:  
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
I have 2 tables TABLE1 and TABLE2, each with multiple columns.

If I set a TIBQuery.SQL to:

select T1.*, T2_COL2 from TABLE1 T1
join TABLE2 on T1_COL1 = T2_COL1
where T1_COL2 = 11
order by T1_COL3

the result set does not include T2_COL2, and T2_COL2 is not listed in the options of a TDBEdit.DataField or in a TDBGrid.Column[n].FieldName.

The same SQL in TIBDataSet.SelectSQL, however returns T2_COL2, and the column is available in the properties mentioned.
Steps to Reproduce:
Drop a TIBTransaction, TDataSource and TIBQuery on a form.
Set the TIBQuery.Transaction and the TIBQuery.Database.
Set the TIBQuery.SQL property to be similar to that shown in the full description.
Set the TDataSource.DataSet to the TIBQuery.
Drop a TDBEdit on the form.
Set the TDBEdit.DataSource to the TDataSource.
Click on the drop-down of the TDBEdit.DataField property.

The columns of TABLE1 are listed, but not the column of TABLE2.
Use a TIBDataSet instead of a TIBQuery with the SQL in the SelectSQL property.


Server Response from: ETNACODE01