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: PL/SQL problem

Re: PL/SQL problem

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Tue, 03 Aug 1999 08:20:13 -0400
Message-ID: <37A6DE7D.44F8EC63@Unforgettable.com>


Can you point to any place in Oracle documentation which would lead you to believe that you can perform this type of operation in pl/sql? While pro-c allows this to be done, that does not automatically commute to pl/sql.

You must provide a seperate host variable for each column in your select list. You cannot select directly into an agregate - you must specify each member of the agregate seperately.

NetComrade wrote:

> declare
> i number;
> k number;
> type var_record is record
> (user manager_close.user_id%type,
> var number);
> type var_record_table is table of var_record index by binary_integer;
> var_table var_record_table;
> begin
> i:=dbms_utility.get_time;
> select user_id, nvl(count(*),0) into var_table from manager_close
> where when_closed = '13-JUL-99' group by user_id;
> k:=dbms_utility.get_time;
> dbms_output.put_line(k-i);
> end;
>
> ORA-06550: line 11, column 1:
> PLS-00393: wrong number of columns in SELECT...INTO statement
> ORA-06550: line 11, column 1:
> PL/SQL: SQL Statement ignored
>
> What am I doing wrong? Thanx.
> ---------------
> Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 373-5417
> AOL: NetComrade ICQ: 11340726 remove NSPAM to email
Received on Tue Aug 03 1999 - 07:20:13 CDT

Original text of this message

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