Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: sql statement
Thanks. And no, it's not for class. Something I'm playing with for work.
Steve
On Wed, 27 Sep 2000 12:23:20 -0400, "Alan" <alanshein_at_spambuster.erols.com> wrote:
>Sounds like a class assignment, which I don't normally answer, but just in
>case...
>
>SELECT count(&v_id)
>FROM your_table
>WHERE id = &v_id
>AND entry > (trunc(sysdate) - 365)
>;
>
>
>"Steve ." <syarbrou_at_nospam.enteract.com> wrote in message
>news:qn34ts8nmhtuaq2tgh4o1dsqb4t93ss4pt_at_4ax.com...
>> I'm trying to figure out an SQL statement to do the following.
>>
>> Enter a number: 12345
>>
>> use that number against a table with the following values:
>>
>> id, date
>>
>> The id is not unique. So when the number 12345 is entered I want to
>> count the number of entries with 12345 for the id, that have dates in
>> the date field, that from the current date, are less than a year old.
>>
>> Thanks.
>>
>> Steve
>>
>> Newsgroup replies preferred. Remove nospam when replying thru email.
>
Received on Wed Sep 27 2000 - 11:34:54 CDT
![]() |
![]() |