Board index » delphi » Oracle SELECT bug?

Oracle SELECT bug?

I have a very strange problem that seems as a bug to me. I have a prety
simple query that basicly has the following structure:

SELECT a.Res
FROM Temp_Result a, Analyte_table b
WHERE
a.[keys=:keys] AND
b.col=a.col
ORDER BY b.sortindex

This results in a set of 6 rows producing almost the expected results
BUT in the first row I am missing the values of several columns
originating the FIRST table "a". When I execute the same query directly
in the Oracle Enterprise manager I do get the complete result set.

When I leave out the ORDER BY or replace it with a different key I get
the data I want.

I have written many and very complex queries but have never met
something like this. I have the feeling that it has to do with the
number of rows in the table which equals the number of rows received (6
in my case) or the name of the table I use (TEMP_RESULT).
When I delete the first row in my query I get the same kind of result as
with 6 rows: empty result on the first row.

I am using BDE 5.1.1, latest patch of SQLORA8.DLL.

Anyone who has seen something before?

Thanks, Herman Steigstra

 

Re:Oracle SELECT bug?


Hi Herman.

Unfortunately i can say that i have exactly the same problem, and i have
isolated it to either the BDE or to my definitions of the Oracle tables (but
i think it is a BDE problem).

See my posting with the subject "Flaky data return from Oracle 8" to see the
details for my problem. You will probably see the same thing happening when
fetching your data with SQL-explorer (that comes with Delphi).

Furthermore it seems like the data is stored ok in the database, but it
fetces them wrongly.

I am very close to dump the BDE and buy the Direct Oralce Access package
from http://www.allroundautomations.nl/
I see the same problem with even simpler queries (select * from table)

I tried a demo version of Direct Oracle Access and there was no problems
fetching the correct data (and it seemed to be a lot faster than the BDE)

Anyway, take a look at my posting (drop a mail if you can't find it - then
i'll mail it to you)

Rgds

Jan

Quote
Herman Steigstra wrote in message <3A2D0045.FFD32...@skzl.nl>...
>I have a very strange problem that seems as a bug to me. I have a prety
>simple query that basicly has the following structure:

>SELECT a.Res
>FROM Temp_Result a, Analyte_table b
>WHERE
>a.[keys=:keys] AND
>b.col=a.col
>ORDER BY b.sortindex

>This results in a set of 6 rows producing almost the expected results
>BUT in the first row I am missing the values of several columns
>originating the FIRST table "a". When I execute the same query directly
>in the Oracle Enterprise manager I do get the complete result set.

>When I leave out the ORDER BY or replace it with a different key I get
>the data I want.

>I have written many and very complex queries but have never met
>something like this. I have the feeling that it has to do with the
>number of rows in the table which equals the number of rows received (6
>in my case) or the name of the table I use (TEMP_RESULT).
>When I delete the first row in my query I get the same kind of result as
>with 6 rows: empty result on the first row.

>I am using BDE 5.1.1, latest patch of SQLORA8.DLL.

>Anyone who has seen something before?

>Thanks, Herman Steigstra

Other Threads