Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: QUERY HELP?
If I understand it right you need a count for every day in interval records. I think, that the easiest way how to get right numbers (it's not much sophisticated, but ...) is:
Best regards
JP
On Wed 12. September 2001 15:20, you wrote:
> Hi
> I need help to get query
> sno is primary key of table
>
> sday and eday will be between (1 and 15)
>
> rowno, sday eday
> 1 2 5
> 2 4 4
> 3 4 5
> 4 8 9
> 5 9 10
>
> the "day" output will be the no which can be equal to sday
> or equal to eday or between sday and eday
>
> we should get output as
> day count
> 2 1 ( in row 1, 2 is equal to sday )
> 3 1 ( it is in row 1, b/n 2 and 5 )
> 4 3 ( in row 2,3 equal to sday and eday ,and b/n 2and5 in row 1 )
> 5 2 like that...
> 8 1
> 9 2
> 10 1
>
>
> Thanks
> Seema
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jan Pruner INET: jan_at_pruner.cz Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Sep 12 2001 - 10:08:38 CDT