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

date-range sql statement

Status
Not open for further replies.

andrewbadera

Programmer
Jan 27, 2002
43
0
0
US
Under SQL Serever 2000, I'm trying to pull projects out of the database to display on a 5-day Gantt-style project timeline chart. Therefore, I need all projects that occur on any of the 5 days on the chart (range[dateStart-dateEndProj] contains range[1st day-5th day]). is there a way to pull this data back with a single SQL statement? or would subqueries or a stored proc be more suited for this? right now I'm on a bit of a deadline, and the fastest solution is the best, for hte moment.

tblJob:
intJobID
dateStart
dateEndProj
dateEndAct
hoursAccum
poundsAccum
hoursProj
poundsProj
customerID
 
use BETWEEN clause in the SQL statement for retrieving records within a date range..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top