Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: parameterized view

Re: parameterized view

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 04 Jan 1999 14:03:39 GMT
Message-ID: <3691c9a3.2133597@192.86.155.100>


A copy of this was sent to suisum_at_ecn.ab.ca () (if that email address didn't require changing) On 4 Jan 99 05:08:21 GMT, you wrote:

>Hi Thomas:
>
>Thank you very much for your prompt and detail explaanation. I have the
>following questions in bind variables.
>
>Thomas Kyte (tkyte_at_us.oracle.com) wrote:
>
>: it doesn't stop it, it (the compiler) verifies that the function OBEYS the
>: pragma. Consider the following:
><snip>
>
>Very clear. I got it. Thank you.
>
>: Yes. You can use bind variables. Consider: <Snip>
>
>Thank you for the example of using bind variable. I got it. But I have
>more questions:
>
>1. Can the value of the bind variable passed back to the call from UNIX/NT
>script?
>
>2. In SQL script, how can I do:
>
> SELECT COUNT(1) FROM emp;
>
>I want the output such as:
>
> There are 99 records in the emp table.
>
>Once again, thanks a lot for your wonderful guidance.
>
>Have a nice day.

Not really (passing it back to UNIX or NT). What you can do is something like this:

SQL> set heading off
SQL> set feedback off
SQL> select 'There are ' || count(*) || ' records in the emp table' from emp;

There are 14 records in the emp table

or, something like:

SQL> column cnt new_value theCnt
SQL> select count(*) cnt from emp;

       CNT


        14

SQL> prompt There are &theCnt records in the table There are 14 records in the table SQL>   Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Jan 04 1999 - 08:03:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US