May 7, 2009 at 9:53 am
Hi Guys
Need some help.
EDIT: SQL Server 2000
I have a date_to & date_from columns. What I need to do is list all the dates in between them
For example
date to date from
01/01/2009 12/01/2009
Results:
01/01/2009
02/01/2009
03/01/2009
04/01/2009
\/
12/01/2009
Help and comments muchly appreciate.
Thanks
Glen
May 7, 2009 at 10:00 am
How much SQL knowledge do you have?
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 7, 2009 at 10:02 am
Intermediate. If it was SQL 2005 I would of used a CTE but I cant do that with SQL 2000.
May 7, 2009 at 10:06 am
Glen Cooley (5/7/2009)
Intermediate. If it was SQL 2005 I would of used a CTE but I cant do that with SQL 2000.
You can use a derived table. You put it where you would put the name of your CTE.
May 7, 2009 at 10:19 am
I guess I misunderstood. I thought you wanted dates from a column where these dates were between 2 given dates, but I see want now.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
May 7, 2009 at 10:45 am
Lynn Pettis (5/7/2009)
Glen Cooley (5/7/2009)
Intermediate. If it was SQL 2005 I would of used a CTE but I cant do that with SQL 2000.You can use a derived table. You put it where you would put the name of your CTE.
Ah very good idea!
Thank you
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply