Thread View: bit.listserv.sqlinfo
4 messages
4 total messages
Started by Diamondback
Fri, 17 May 2002 19:38
query for today .. and after
Author: Diamondback
Date: Fri, 17 May 2002 19:38
Date: Fri, 17 May 2002 19:38
13 lines
1665 bytes
1665 bytes
I've got an event database that is starting out in Access, but eventually
will make its way to MySQL. My query (below) performs a simple find for all
upcoming events. My problem is that it leaves out events occuring today. I
need a query that will include events occuring for the current day, as well
as future events. Can someone help here?
SELECT event_id, event_name, event_date,
description, event_time, event_location,
city, state, contact, contact_email,
contact_phone
FROM events
WHERE event_date >= Now()
ORDER BY event_date, event_name
Re: query for today .. and after
Author: Bruce
Date: Mon, 20 May 2002 14:00
Date: Mon, 20 May 2002 14:00
21 lines
1725 bytes
1725 bytes
your problem is NOW returns date and time. not sure in MySQL (datepart or convert?) but in Access: Where event_date >= format(now(),"mm/dd/yyyy") On Fri, 17 May 2002 19:38:39 GMT, "Diamondback" <diamondback@hotmail.com> wrote: >I've got an event database that is starting out in Access, but eventually >will make its way to MySQL. My query (below) performs a simple find for all >upcoming events. My problem is that it leaves out events occuring today. I >need a query that will include events occuring for the current day, as well >as future events. Can someone help here? > >SELECT event_id, event_name, event_date, > description, event_time, event_location, > city, state, contact, contact_email, > contact_phone >FROM events >WHERE event_date >= Now() >ORDER BY event_date, event_name >
Re: query for today .. and after
Author: Diamondback
Date: Mon, 20 May 2002 16:56
Date: Mon, 20 May 2002 16:56
30 lines
2338 bytes
2338 bytes
I'm running this through ColdFusion, and keep getting an error referencing a syntax problem in the query. Any ideas? "Bruce" <bruce@Lovingscents.com> wrote in message news:j80ieucb04jlrs52lv0dkht6jh56gunqvc@4ax.com... > your problem is NOW returns date and time. > not sure in MySQL (datepart or convert?) but in Access: > Where event_date >= format(now(),"mm/dd/yyyy") > > On Fri, 17 May 2002 19:38:39 GMT, "Diamondback" > <diamondback@hotmail.com> wrote: > > >I've got an event database that is starting out in Access, but eventually > >will make its way to MySQL. My query (below) performs a simple find for all > >upcoming events. My problem is that it leaves out events occuring today. I > >need a query that will include events occuring for the current day, as well > >as future events. Can someone help here? > > > >SELECT event_id, event_name, event_date, > > description, event_time, event_location, > > city, state, contact, contact_email, > > contact_phone > >FROM events > >WHERE event_date >= Now() > >ORDER BY event_date, event_name > > >
Re: query for today .. and after
Author: Bruce
Date: Wed, 22 May 2002 20:03
Date: Wed, 22 May 2002 20:03
37 lines
2820 bytes
2820 bytes
I dont know cold fusion but guess it is choking on the convert/format see if it have a format function or datepart function On Mon, 20 May 2002 16:56:24 GMT, "Diamondback" <diamondback@hotmail.com> wrote: >I'm running this through ColdFusion, and keep getting an error referencing a >syntax problem in the query. Any ideas? > >"Bruce" <bruce@Lovingscents.com> wrote in message >news:j80ieucb04jlrs52lv0dkht6jh56gunqvc@4ax.com... >> your problem is NOW returns date and time. >> not sure in MySQL (datepart or convert?) but in Access: >> Where event_date >= format(now(),"mm/dd/yyyy") >> >> On Fri, 17 May 2002 19:38:39 GMT, "Diamondback" >> <diamondback@hotmail.com> wrote: >> >> >I've got an event database that is starting out in Access, but eventually >> >will make its way to MySQL. My query (below) performs a simple find for >all >> >upcoming events. My problem is that it leaves out events occuring today. >I >> >need a query that will include events occuring for the current day, as >well >> >as future events. Can someone help here? >> > >> >SELECT event_id, event_name, event_date, >> > description, event_time, event_location, >> > city, state, contact, contact_email, >> > contact_phone >> >FROM events >> >WHERE event_date >= Now() >> >ORDER BY event_date, event_name >> > >> >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads