Viewing 2 posts - 1 through 2 (of 2 total)
kramaswamy (7/19/2011)
WHERE ((DATEPART(dw, [Your_Date]) + @@DATEFIRST) % 7) NOT IN (0, 1)
that excludes weekends from your query. the @@DATEFIRST part is necessary to adjust...
July 19, 2011 at 12:03 pm
#1355079
The tables are very large, so I cut it down to only the data points needed to get to the results.
Here are the create table statements:
/****** Object: Table [dbo].[PS_POSITION_DATA]...
July 19, 2011 at 11:44 am
#1355059