Re: SQL-Proceudre: SELECT ... INTO... within a while loop - doesn´t work

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: 19 Jul 2004 01:12:45 -0700
Message-ID: <b6beca79.0407190012.4520bbca_at_posting.google.com>


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 - 10:12:45 CEST

Original text of this message