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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL plus problem

Re: SQL plus problem

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: Sun, 02 Apr 2000 13:09:37 GMT
Message-ID: <8c7gqe$3ge$1@nnrp1.deja.com>


In article <38E49CB2.4EA4C301_at_Unforgetable.com>, K Stahl <BlueSax_at_Unforgetable.com> wrote:
> FABIO DA SILVA BORGES wrote:
> >
> > OK, the query looks like this:
> >
> > select a,b from c
> >
> > and yields the following
> >
> > a b
> > ------ -------
> > 1 a
> > 2 b
> > 3 c
> > 4 d
> > ...
> > 15 o
> >
> > But the table "c" has more than 15 rows. The query:
> >
> > select b from c where a=26
> >
> > yields
> >
> > b
> > --------
> > z
> >
> > Why didn't the tuple (26,z) appear in the first query???
> > Wouldn't it be some configuration problem???
> >
> > Thank you for your attention.
> >
>
> But why do you have data like that in the first place? What meaning
could
> such items have? The point is, you didn't post "real world" data nor a
> "real world" sql statement. Your hypothetical sql statement probably
avoids
> the problem that your real sql has.
>
> Have you tried entering a "show all" command to see if there are any
> settings for sql plus that are interfering with the output?
>

real world or not -- its a bug. Good small testcases such as this are excellent for diagnosing the problem. If it was some horribly complex query against tons of data -- that would just tend to obfusicate the underlying problem (which is that all data that should be fetched and displayed is not)....
I don't see the original post so i'll follow up from this one. It looks like you are using a 7.x sqlplus client against an 8.x database. The default array size in sqlplus is 15 rows. It is getting an end of data on the second fetch of the second 15 rows (really 11 rows since you have a-z in the table). That is because the 7.x client is interpreting the response from the 8.x server wrong and is not printing out the second array fetch.
The solution is:
SQL> set arraysize 1
in the 7.x sqlplus client or using the 8.x sqlplus against 8.x. --
Thomas Kyte tkyte_at_us.oracle.com
Oracle Service Industries http://osi.oracle.com/~tkyte/index.html --
Opinions are mine and do not necessarily reflect those of Oracle Corp

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Apr 02 2000 - 08:09:37 CDT

Original text of this message

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