Re: PL/SQL - Can I SELECT variables?

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Sun, 13 Jun 1999 04:51:01 -0700
Message-ID: <37639B24.FE9C679A_at_u.washington.edu>


You might just try assigning the values....

    var1 := xxxx;
    var2 := yyyy;

Assuming they are both out variables, you should be able to evaluate them.

Mike Krolewski

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 Sun Jun 13 1999 - 13:51:01 CEST

Original text of this message