Re: PL/SQL - Can I SELECT variables?

From: Marc Mazerolle <informaze_at_sympatico.ca>
Date: Mon, 07 Jun 1999 20:19:23 GMT
Message-ID: <375C2A82.4F33758_at_sympatico.ca>


Why not : select var1, var2 from dual; ?

Greg Smith wrote:

> Does anyone know how to get the value of a variable in PL/SQL into a
> result set easily? In Transact-SQL, I believe all I have to do is
>
> SELECT var1, var2
>
> and I get a result set with a row containing the variable values. But
> in PL/SQL, I can't write this simple SELECT. It always wants a FROM
> clause, but I don't really have anything I'm SELECTing from, other than
> the variables themselves.
>
> (BTW - what I'm really trying to do is get those OUT variable back into
> my Perl DBI routine. The DBI bind for variables appears to be good only
> for setting up IN variables. The best way I can see to get back the OUT
> variables is to SELECT them and then use DBI's bind_column feature, from
> which I'll be able to read their values.)
>
> Thanks for any help.
>
> Greg Smith
Received on Mon Jun 07 1999 - 22:19:23 CEST

Original text of this message