List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:October 5 1999 11:51am
Subject:Re: select wanted
View as plain text  
On Tue, 1999-10-05 14:06:47 +0300, Bogdan Paduraru wrote:
> You didn't understand. 

Then you maybe weren't clear enough ...? :-)

> Let's say wew have those 2 data : 28.09. and 3.10. Your select is
> not working too. If I'll select those records between 28.09. and
> 3.10 I'll receive those records between 3 and 28 of each month, but
> I need those records from 28.09,29.09,30.09. and 1.10,2.10,3.10. Do
> you understand now?

Yes.  You did describe now much better, what the problem is.  :)

You better should use a normal DATE field instead of several seperate
fields for day, month (and year?)!  Then you easily can compare like
   mydate BETWEEN fromdate AND todate

But if you really have to deal with seperate day and month fields,
you have to compare lexicographically:
     (month>limit1 OR month=limit1 AND day>=limit3)
 AND (month<limit2 OT month=limit2 AND day<=limit4)

Untested, but I hope it works ...

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=5244 5EF3 B0B1 3826  E4EC 8058 7B31 3AD7
select wantedbpaduraru5 Oct
  • Re: select wantedMartin Ramsch5 Oct
    • Re: select wantedbpaduraru5 Oct
      • Re: select wantedBob Kline5 Oct
      • Re: select wantedMartin Ramsch5 Oct
        • Re: select wantedMichael Widenius7 Oct
  • Re: select wantedBob Kline5 Oct
  • Re: select wanteddstankovic5 Oct
  • select into outfiledstankovic5 Oct
    • Re: select into outfilesinisa5 Oct