July 25, 2008 at 10:44 am
I have a query in SSRS that works with 1 where clause but not another. Can anyone help this newbie?
This works
Where DATEADD(HOUR, -5, e.starttime) between DATEADD(mm, - 3, GETDATE()) and GETDATE ()
This one does not.
Where DATEADD(HOUR, -5, e.starttime) between DATEADD(mm, - 3, @QTR_EndDate()) and @QTR_EndDate)
Error 102: Incorreact yntax near '('
I have tried everything but can't get it to work.
:w00t:
Changinagain
July 27, 2008 at 5:47 pm
Where DATEADD(HOUR, -5, e.starttime) between DATEADD(mm, - 3, @QTR_EndDate) and @QTR_EndDate)
should work. You had brackets () after the @QTR_EndDate in the DATEADD. Should fix the problem.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy