snerting
Programmer
- Oct 20, 2005
- 52
SELECT a.[_ds_dataset] FROM table1 a
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM table1 b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
This SQL returns the following (query-view):
_ds_dataset
1
SELECT a.[_ds_dataset],a.[_ds_delete_object] FROM table1 a
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM table1 b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
Just adding [_ds_delete_object] to be selected gives me this (query-view):
_ds_dataset _ds_delete_object
2 0
So, _ds_dataset has changed in the recordset, even though neither the source tables nor the where clauses have changed!
To make it even freakier:
SELECT a.[_ds_dataset] FROM nc_questions a
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM nc_questions b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
AND [_ds_dataset]=2
Now I hard-coded that _ds_dataset has to be 2. Result (query-view):
_ds_dataset
1
Using Access 2003, Oracle8 ODBC drivers to a Oracle10g database.
This strange behavior does not happen in Oracle when running the Oracle8 sqlplus client directly on the database. Neither does it happen through Python win32com ADODB.
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM table1 b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
This SQL returns the following (query-view):
_ds_dataset
1
SELECT a.[_ds_dataset],a.[_ds_delete_object] FROM table1 a
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM table1 b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
Just adding [_ds_delete_object] to be selected gives me this (query-view):
_ds_dataset _ds_delete_object
2 0
So, _ds_dataset has changed in the recordset, even though neither the source tables nor the where clauses have changed!
To make it even freakier:
SELECT a.[_ds_dataset] FROM nc_questions a
WHERE a.instance=595
AND [_ds_dataset] =
(
SELECT MAX(b.[_ds_dataset])
FROM nc_questions b
WHERE b.[instance] = a.[instance]
AND b.[_ds_dataset] IN (2,1)
)
AND [_ds_dataset]=2
Now I hard-coded that _ds_dataset has to be 2. Result (query-view):
_ds_dataset
1
Using Access 2003, Oracle8 ODBC drivers to a Oracle10g database.
This strange behavior does not happen in Oracle when running the Oracle8 sqlplus client directly on the database. Neither does it happen through Python win32com ADODB.