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 -> Different SELECT result when run from SQLPLUS and asSP

Different SELECT result when run from SQLPLUS and asSP

From: <todecker_at_my-deja.com>
Date: Tue, 07 Dec 1999 11:08:44 GMT
Message-ID: <82iprr$1qr$1@nnrp1.deja.com>


Does anybody have an explanation for these results?

SQL> select count(*)
  2 from sys.all_tab_columns;

 COUNT(*)


    25968

SQL> CREATE OR REPLACE PACKAGE test AS
  2 PROCEDURE the_output;
  3 END test;
  4 /

Package created.

SQL> CREATE OR REPLACE PACKAGE BODY test AS   2
  3 PROCEDURE the_output IS
  4 x NUMBER(10);
  5 BEGIN

  6        select count(*)
  7         INTO x
  8         from sys.all_tab_columns;

  9 dbms_output.put_line('x: '||x);
 10 END;
 11 END test;
 12 /

Package body created.

SQL> set serveroutput on
SQL> execute test.the_output;
x: 5069

PL/SQL procedure successfully completed.

I tried it under oracle 8.0.5 and 8.1.5 and get the same results. It somehow seems to be related to the users rights because I have a 3rd installation where it works fine.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 07 1999 - 05:08:44 CST

Original text of this message

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