Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

workdays in SQL 7.0

Status
Not open for further replies.

Romanichine

Programmer
Apr 9, 2002
30
CA
Hi,

I need to convert an Access application to a web application
with SQL 7.0 running behind.

Now there is this workdays() function that I am stuck with.
The function receives two dates in arguments, and returns
an integer corresponding to the number of working days within the two dates (i.e. removing the holidays contained in a Holiday table, and removing saturdays and sundays). In Access you can call it within a SQL statement such
as in:

SELECT (myTable.iRatio / workdays(myTable.dateStart, myTable.dateEnd) as "average_by_day",
myTable.dateStart, myTable.dateEnd
FROM myTable

With SQL Server 2000 this function would be easy meat to
convert using an UDF, but unfortunately I'm forced to
use 7.0 on this project and have absolutely no idea how
to make the conversion.

Any help would be really appreciated.

Thank you!
--
Roman.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top