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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with a query plz

Status
Not open for further replies.

Altamarus

Programmer
Jan 25, 2006
16
CA
I have a table like this

//STARTING_DATE//DAY1//DAY2//DAY3//DAY4...//DAY7
////////////////////////////////////////////////
//2005-01-02 // 0 // 1 // ...
//2005-01-09 // 0 // 0 // ...
//2005-01-16 // 0 // 0 // ...
//2005-01-23 // 0 // 1 // ...
//2005-01-30 // 0 // 1 // ...
/////////////////////////////////////////////////
Where day 1 to day 7 are the days worked (1) or not(0) worked in the week for the month. I just cannot figure out how I could count the number of days worked in the month depending on the date entered by the user.

Is there any function to count the number of ones in a certain row?

Thank you =D
 
Have a look here:

Anyway what about simply DAY1+DAY2+...+DAY7 ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
ok thx i'll give it a try....your help is very appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top