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 -> Re: Inconsistent SELECT results

Re: Inconsistent SELECT results

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Sat, 12 Jul 2003 10:57:36 +0200
Message-ID: <49jvgv47rdca16drdd4pcmno44pda23pk5@4ax.com>


On 12 Jul 2003 00:30:15 -0700, ramon_at_conexus.net (Ramon F Herrera) wrote:

>Has anybody out there seen a problem like this one?
>
>The problem in question happens only through the OCI,
>when I use SQL*Plus everything is fine.
>
>My C OCI program performs 2 queries, as follows:
>
>select count(1) from sometable where somefield='1234';
>
>and a very similar statement:
>
>select field1, field2, field3 from sometable where somefield='1234';
>
>(there are 11 fields in my real query, the above is a simplification).
>
>The "count(1)" statement correctly reports the number of hits,
>but when I request the actual data in the second query I almost
>invariably get a small percentage of the actual hits.
>
>For instance, one of the particular query should return 910 records,
>but it only returns 11.
>
>I am preparing a second Oracle server, to test the hypothesis
>of my first server having some corrupted file, but I wonder
>if any of you out there has seen this.
>
>TIA,
>
>-Ramon F. Herrera
>
>RedHat Linux 7.3
>Oracle 9iR2

The obvious suggestion would be of course to try to repeat the behavior in sql*plus. 'Corrupted files' are a rarity in Oracle and usually come up when people fall prey to superstition. Are you dead sure your program is correct?

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sat Jul 12 2003 - 03:57:36 CDT

Original text of this message

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