I haven't looked at SQL server since the days of NT4. But, assuming what you're trying to get is all the rows in which the date is on a weekend I think you can do something like:
Code:
SELECT x,y,z FROM myTable WHERE DATEPART(dw, @InDate) IN (1,7)
This is not tested!
I do know /for a fact/ that MySQL does the same thing thus
Code:
SELECT x,y,z FROM myTable WHERE WEEKDAY(inDate) IN (5,6);
--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock:
http://charlieharvey.org.uk