Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Graph of years Figures

Author  Topic 

Les.61
Starting Member

49 Posts

Posted - 2010-11-24 : 23:01:45
I have a graph that shows daily figures for the year. Is there any way I can have the previous year and current year as 2 different lines and ignore any previous years. The field I have are 'date' and 'balance'

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-11-25 : 05:06:38
You need to create two separate datasets first and then make sure that the date-part of your data is only month and day (so that both datasets can be grouped using the same day values).

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page

Les.61
Starting Member

49 Posts

Posted - 2010-11-29 : 17:25:50
Many thanks Lumbago. I know how to split the day/month/year but how to I select the day/month?
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2010-11-29 : 18:17:44
You could use (MONTH(Date)*100) + DAY(Date)) as a derived column.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
   

- Advertisement -