Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!postnews1.google.com!not-for-mail
From: JusungYang@yahoo.com (Jusung Yang)
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.tools,comp.databases.oracle.misc
Subject: Re: SQL Works but PL/SQL hangs
Date: 5 May 2003 10:49:07 -0700
Organization: http://groups.google.com/
Lines: 29
Message-ID: <130ba93a.0305050949.2236662@posting.google.com>
References: <8c1ec68c.0305030010.525ac4af@posting.google.com>
NNTP-Posting-Host: 64.165.201.215
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1052156948 15185 127.0.0.1 (5 May 2003 17:49:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 5 May 2003 17:49:08 GMT
Xref: core-easynews comp.databases.oracle.server:185331 comp.databases.oracle.tools:58795 comp.databases.oracle.misc:97331
X-Received-Date: Mon, 05 May 2003 10:48:37 MST (news.easynews.com)

amirrazakhan@hotmail.com (Amir) wrote in message news:<8c1ec68c.0305030010.525ac4af@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@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@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
