Calculating Week days in MSSQL

Had a requirement to calculate the weekdays between given date range (No of Days – Weekends). Finally with the help of WWW, I manage to figure out a way to do it in MS SQL DECLARE @START_DATE = '2012-09-17' DECLARE @WEEKDAYS INT SELECT @WEEKDAYS = (...