Groups | Blog | Home
all groups > sql server reporting services > may 2005 >

sql server reporting services : Show data for CURRENT YEAR only


pmud
5/26/2005 2:34:03 PM
Hi ,

I have a very simple question. I want to show data in my report only for the
current year. How to do that? n my query , I did , WHERE
Year(OrderDate)=Year(Now) . But it gave me a syntax error.

What is the correct syntax for this?

Thanks
--
scraejtp
5/26/2005 3:18:02 PM
WHERE (YEAR(OrderDate) = YEAR(GETDATE()))

[quoted text, click to view]
pmud
5/26/2005 3:42:07 PM
Hi scraejtp,

That worked. :) Thanks...
--
pmud


[quoted text, click to view]
Matt
5/27/2005 12:00:00 AM
Yes, the Query is native TSQL which currently doesn't recognise .NET objects
although I believe the later version (2005) is more closely integrated so
perhaps then your statement will - who knows?.

[quoted text, click to view]

AddThis Social Bookmark Button