Announcement

Collapse
No announcement yet.

Whats wrong with this SQL code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Whats wrong with this SQL code?

    I am trying to introduce parameters so people can select values "Between THIS year, month and day and THIS year, month and day" from a menu in SQL Reporting Services.

    Code:
    WHERE ((A.hitDate >= @FromYear AND @FromMonth AND @FromDay) AND (A.hitDate < DATEADD(Day, 1, @ToYear AND @ToMonth AND @ToDay))
    can anyone put me straight?

    Thanks for any help

    #2
    What on earth am i doing??

    (A.hitDate >= @FromDate) AND (A.hitDate < DATEADD(Day, 1, @ToDate))


    funny how your mind oasionally turns to hore manure

    Comment

    Working...
    X