Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Very strange behaviour of SQL under OCI

Very strange behaviour of SQL under OCI

From: Grzesiek <grzesiek_at_no.spam>
Date: Thu, 01 Apr 1999 11:55:32 GMT
Message-ID: <7dvl5k$3n0$1@euler.softax.com.pl>


Hi everyone,
I have a problem with SQL statment excuted with OCI. I'm using ORACLE 8.0.3 under OpenVMS 7.1-1H2
and old OCI (from version 7.3.2 - oexec, ofen, etc...) compiled with new libraries.
Under SQLPLUS statments results are always correct.

Consider my statment:

SELECT kod_odm FROM tx;

Table tx contains over 3000 records, but under OCI I've got only 1.

Next statment is:

SELECT kod_odm FROM tx WHERE kod_odm IS NOT NULL;

This time I've got correct results (940 records).

Next statment is:

SELECT kod_odm FROM tx WHERE kod_odm IS NOT NULL OR kod_odm IS NULL;

Again, I've received only one record.

This is execution plan of the last statment below:



SELECT kod_odm
FROM
 tx where kod_odm is not null or kod_odm is null

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ------



Parse 1 0.00 0.01 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 5 1 3 0
------- ------ -------- ---------- ---------- ---------- ---------- ------


total 3 0.00 0.01 5 1 3 0

Misses in library cache during parse: 1 Optimizer goal: RULE
Parsing user id: 18 (PZ)

Rows Execution Plan
------- ---------------------------------------------------

      0  SELECT STATEMENT   GOAL: RULE
      1   TABLE ACCESS   GOAL: ANALYZED (FULL) OF 'TRANSAKCJE'


-------------------------

Results for every other column selected from table tx are correct.

Does anybody know the reson of this strange OCI behaviour?

TIA Grzesiek

--
Grzegorz Gizinski
Reply for spam. Real e-mail:
Grzegorz.Gizinski_at_softax.com.pl Received on Thu Apr 01 1999 - 05:55:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US