Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Daily Rate Crosstab

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-27 : 08:45:57
Lawrence writes "Hi

i am trying to create a query report based on following table:


order_Id | start_Date | end_date | Rate(daily water use)
--------------------------------------------------------
100 10/11/2001 16/11/2001 10
101 15/11/2001 24/11/2001 5


the output i am after is for a given start and end date, say:

order_id |13/11/2001 |14/11/2001 |15/11/2001 |16/11/2001|
----------------------------------------------------------
100 10 10 10 10
101 5 5

Could someone help

Thanks
Lawrence"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-11-27 : 10:06:09
Do these help?

http://www.sqlteam.com/item.asp?ItemID=2955
http://www.sqlteam.com/item.asp?ItemID=5741

The second article is almost exactly what you're looking for.


Go to Top of Page
   

- Advertisement -