vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I would create a stored procedure that would check the day of the week using the DATEPART function. If the day is 1 or 7 (Sun or Sat), issue 1 query with the SELECT TOP 1, otherwise just a normal SELECT. Oscar... "Vincent Jones" <vncntj@hotmail.com> wrote in message news:ba2a2d30.0308310837.52f2f2c5@posting.google.c om... > I want to create an sql statement that gives me the top 1 if the date > selected is a weekend. It's not the current day but various days > throughout a calendar. > So if someone goes back to aug 29 they will see > Select Top 1 * from table1 > but if they go to aug 30 then: > Select * from table1 > thanks |