Re: SQL Works but PL/SQL hangs

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 5 May 2003 10:49:07 -0700
Message-ID: <130ba93a.0305050949.2236662_at_posting.google.com>


amirrazakhan_at_hotmail.com (Amir) wrote in message news:<8c1ec68c.0305030010.525ac4af_at_posting.google.com>...
> When I issue a statement to fetch some data from the remote database
> on the SQL prompt it works fine, as given below
>
> SQL> select trans_no from XYZ_at_remotedb;
>
> But when I embbed the same query in PL/SQL block it hangs and does not
> complete
>
> declare
> x varchar2(50);
> begin
> select trans_no into x from XYZ_at_remotedb;
> end;
>
>
> What could be the reason?
>
> ~~Amir

In any case, this PL/SQL codes look bad. Unless your XYZ table has only 1 row, you will get error from that statement - you can not select values from multiple rows into a single variable. Something else might be covering up the real problem. Make sure only one row is returned from the select. It is better the code correctly than to write bad codes and try to figure out why they do not work as expected.

  • Jusung Yang
Received on Mon May 05 2003 - 19:49:07 CEST

Original text of this message