| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: SQL-Proceudre: SELECT ... INTO... within a while loop - doesn´t work
bertholomaeus_at_yahoo.ca (bert) wrote in message news:<ea3b40c.0407160615.253a680c_at_posting.google.com>...
> Hi,
>
> I want to insert the result of a select into a procedure-variable
> within a while-loop. The loop works as far as I don´t insert following
> line:
>
> select tea.FDATE into ldTeaDate2 from ... tea where tea.ID = ldTeaId;
>
> the error message:
> ORA-01403: no data found
> ORA-06512: at "...", line 70
>
> The table and variables are created by the same user, who execute the
> statement.
>
> Have anyone an idea?
There are no records in the tea table that meet your where clause.
You ought to catch any exceptions that this code could throw
The two that spring to mind are no data returned (which you have hit) and exact fetch returns more than requested number of rows (when you return more than one record).
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
Received on Mon Jul 19 2004 - 03:12:45 CDT
![]() |
![]() |