Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
select data after today |
Thu, Mar 1 2007 4:45 AM | Permanent Link |
"Harry de Boer" | dbIsam 3.3. D6
LS. I have a table with two integer fields year and month. How do I get all the data (sql statement) where the year-month combination is not in the past (so: today's year/month and the year/months ahead). Regards, Harry |
Thu, Mar 1 2007 5:07 AM | Permanent Link |
Chris Erdal | "Harry de Boer" <harry@staaf.nl> wrote in
news:67DC0DB9-48F5-4083-A3A1-7727188703A8@news.elevatesoft.com: > I have a table with two integer fields year and month. How do I get > all the data (sql statement) where the year-month combination is not > in the past (so: today's year/month and the year/months ahead). > SELECT * WHERE YearFld*100+MonthFld >= EXTRACT(YEAR,CURRENT_DATE)*100+EXTRACT (MONTH,CURRENT_DATE) -- Chris (XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 3 + EDB 1.00 build 6) |
Thu, Mar 1 2007 7:58 AM | Permanent Link |
"Harry de Boer" | Chris,
Thanks Changed it to: EXTRACT(YEAR FROM CURRENT_DATE) works like a charm! Harry "Chris Erdal" <chris@No-Spam-erdal.net> schreef in bericht news:Xns98E66FFC9EC8014torcatis@64.65.248.118... > "Harry de Boer" <harry@staaf.nl> wrote in > news:67DC0DB9-48F5-4083-A3A1-7727188703A8@news.elevatesoft.com: > > > I have a table with two integer fields year and month. How do I get > > all the data (sql statement) where the year-month combination is not > > in the past (so: today's year/month and the year/months ahead). > > > > SELECT * > WHERE YearFld*100+MonthFld >= EXTRACT(YEAR,CURRENT_DATE)*100+EXTRACT > (MONTH,CURRENT_DATE) > > -- > Chris > (XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 3 + EDB 1.00 build 6) > |
This web page was last updated on Thursday, March 28, 2024 at 08:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |