Link to home
Start Free TrialLog in
Avatar of omegalove
omegalove

asked on

Invalid parameter 1 specified for datediff.

WHERE
            [pi].IndexID > @PageLowerBound AND
            [pi].IndexID < @PageUpperBound

And Country = @Country and
tbl_Profile.Gender = @Gender
and (DateDiff('yyyy', tbl_profile.BirthDate,getdate()) >= @Age1)
and (DateDiff('yyyy',tbl_profile.BirthDate,getdate()) <= @Age2)

      ORDER BY
            IndexID
      
      SET ROWCOUNT 0

      
      
END

Age1 and Age2 are integers
ASKER CERTIFIED SOLUTION
Avatar of indianguru2
indianguru2
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of omegalove
omegalove

ASKER

awesome