Hello all,
My table is structured as follows.
SundayDate - Date
Helper1 - VarChar(25)
Helper2 - VarChar(25)
Helper3 - VarChar(25)
Helper4 - VarChar(25)
Helper5 - VarChar(25)
Helper6 - VarChar(25)
I want to display the names of all the helpers that are that are associated with the next Sunday to come.
For example, say I have 2 rows in my table:
2008/01/13 John James Henry Albert Peter George
2008/01/20 Ruth David Philip Simon Mikey Daniel
Today is 2008/01/10, so I want to select John, James, Henry, Albert, Peter and George as the next Sunday after the today is 2008/01/13.
I realise I need to get the date of the next Sunday (str_NextSundayDate). Once I have this date then I do something like :
"SELECT * FROM table WHERE SundayDate = str_NextSundayDate"
The bit I'm not sure of is how to work out what date the next Sunday will be.
Can anyone advise?
Thanks,
John