From: "Owens, Howard" <[EMAIL PROTECTED]>
>I would like to extract in a query the following information ...
>
>first year of published stories
> first month of that first year
> first day of that first month of that first year
>
>last year of published stories
> last month of that last year
> last day of that last month of that last year
>
So, you basically want the first published date and the last published date?
Assuming you can use min and max with dates in SQL, why not this:
SELECT
min(pub_date) first_date,
max(pub_date) last_date
FROM
table
>From there, if you need to extract the date, month, or year from each date, you can
>do so in CF.
I'm sure there's probably an all-SQL solution someone will provide, though.
--------------------------------
Scott Brady
http://www.scottbrady.net/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4