I have a ASP set up that displays info from a sql table in a grid. Below is the select statement. I use VS 2005 and just went though the wizards to set up the data source.
This works fine but instead of it pulling just the current date I would like it to match based on a date the user picks preferrably from the calendar I have on the page. But I have no clue how to do this or if it's even possible.
I'd would really appreciate any help.
Thanks,
Sara
select club,count(ordernum) as Total_Pieces,sum(tblUSPSBasicRate.rate) as TotalCost, shipdate
FROM tblshipments INNER JOIN
tblUSPSBasicRate ON tblshipments.wt = tblUSPSBasicRate.wt
where shipvia='014' AND datepart(day,shipdate)=datepart(day,getdate())and datepart(month,shipdate)=datepart(month,getdate()) and datepart(year,shipdate)=datepart(year,getdate())
group by club,shipdate
This works fine but instead of it pulling just the current date I would like it to match based on a date the user picks preferrably from the calendar I have on the page. But I have no clue how to do this or if it's even possible.
I'd would really appreciate any help.
Thanks,
Sara
select club,count(ordernum) as Total_Pieces,sum(tblUSPSBasicRate.rate) as TotalCost, shipdate
FROM tblshipments INNER JOIN
tblUSPSBasicRate ON tblshipments.wt = tblUSPSBasicRate.wt
where shipvia='014' AND datepart(day,shipdate)=datepart(day,getdate())and datepart(month,shipdate)=datepart(month,getdate()) and datepart(year,shipdate)=datepart(year,getdate())
group by club,shipdate