Re: interactive SQL plus script

From: Juhan Kundla <juhan_at_ensib.ee>
Date: Thu, 08 Apr 1999 13:08:12 +0300
Message-ID: <370C800C.B55359DC_at_ensib.ee>


sandy weinberg wrote:
>
> I am a beginner in SQL queries and have created following script:
>
> select number, call_datetime date, input_source
> from billingdata
> where input_source like 'NN%';
>
> When the script is run I would like to enter a begin and end date for
> using the variable call_datetime.
>
> Can someone tell me how to do this, I'm still looking through my 2
> books about SQL but they don't say a whole lot about interactive
> programming.
>
> Thanks in advance for your help!
>
> Sincerely yours,
>
> Sandy.

Greetz.

Try this

select number, call_datetime date, input_source from billingdata
where input_source like 'NN%'
and date between '&beginning' and '&end';

You can also use commands define and accept to define and accept variables and use double ampersands if you don't want to re-enter those values every time you run the query. Note: use quotes only when the value you enter is char type.

Juhan Received on Thu Apr 08 1999 - 12:08:12 CEST

Original text of this message