Like Mark said, I'd first look to using the year() function if its available in
your dbms.If not you can also use a BETWEEN.
i.e.
where createdDate BETWEEN createODBCDateTime(startdate) AND
createODBCDateTime(enddate)
Another option I guess (I think depending on dmbs as well) is to use the =
[EMAIL PROTECTED]
To: cf-talk cf-talk@houseoffusion.com
Sent: Thursday, October 16, 2008 12:48 AM
Subject: Re: Pulling only 1 year of records
On Wed, Oct 15, 2008 at 10:38 PM, Phillip M. Vector
[EMAIL PROTECTED] wrote:
How do I write a query to only pull 1 year (2009 lets say) from the DB
How do I write a query to only pull 1 year (2009 lets say) from the DB
that has a date field?
would I do something like
where datestarting like %09
?
I mean, that MAY work, but is there a less kludgy way of doing it?
Dave l wrote:
Ah, so eps is more like a 'psd' file rather than a 'png'
select * from
foo
where
year(foo.date) = 2009
Assuming your db has a year() function. Most do.
Mark
On Thu, Oct 16, 2008 at 4:38 PM, Phillip M. Vector
[EMAIL PROTECTED] wrote:
How do I write a query to only pull 1 year (2009 lets say) from the DB
that has a date field?
would I do something
Cool. Thanks. :)
Mark Mandel wrote:
select * from
foo
where
year(foo.date) = 2009
Assuming your db has a year() function. Most do.
Mark
On Thu, Oct 16, 2008 at 4:38 PM, Phillip M. Vector
[EMAIL PROTECTED] wrote:
How do I write a query to only pull 1 year (2009 lets say) from the
On Wed, Oct 15, 2008 at 10:38 PM, Phillip M. Vector
[EMAIL PROTECTED] wrote:
How do I write a query to only pull 1 year (2009 lets say) from the DB
that has a date field?
would I do something like
where datestarting like %09
?
I mean, that MAY work, but is there a less kludgy way of
6 matches
Mail list logo