Day / Date

G

Gary Nelson

In Acces 2000, I trying to write a stored procedure in order that I can
provide a breakdown of the number of "jobs" completed by day - Monday
through Friday. I have been successful in writing the code below which
gives me the jobs completed on Monday, but am uncertain how to write the
code for Tuesday through Friday. Please help...

Thanks in advance for your assistance.

Alter Procedure spAPKJobsBoundByDay

as declare @monday smalldatetime

set @monday = DATEADD(DAY, 2-DATEPART(DW, {fn CURDATE()}),{fn CURDATE()})

select dbo.bookall.jobnum, dbo.bookall.datein from dbo.bookall where
dbo.bookall.datein =@monday
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top