Re: Run report errors on Report Writer

From: Bill Norswether <billn_at_mcs.com>
Date: 1995/11/22
Message-ID: <48tpsa$s01_at_News1.mcs.net>#1/1


In article <48hfvb$mgt_at_tst.hk.super.net>, mike_at_dt.com.hk says...
>
>Hello Oracle Experts,
>
> Our oracle have down recently due to the failure of the harddisk, and
>after replace the harddisk and restore data. We found that some of the
>report cannot be run. It always shows the error:
>
> ORA-2112 "PCC: SELECT..INTO returns too many rows"
>
> Can anyone tell me what wrong????
>

The SELECT...INTO statement that you've written uses a scalar variable. This tells Oracle that your SELECT..INTO should result in one and only one row being returned. But what is happening is more than one row is being returned. Oracle detects this condition ( and complains ) at runtime. You can do two things to remedy this: clean up your data so that your SELECT..INTO returns only one row ( I assume that this statement used to work ) or better yet, define a cursor and set up a cursor FOR loop or a cursor FETCH loop and retrieve as many records as you wish.

Hope this helps.

Bill Norswether, Jr.
billn_at_mcs.com Received on Wed Nov 22 1995 - 00:00:00 CET

Original text of this message