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
 Transact-SQL (2000)
 Select

Author  Topic 

DENIZ3E
Yak Posting Veteran

56 Posts

Posted - 2005-02-23 : 14:40:58
HI
I would like to see all the weeks seperate.The ones to be delivered should take place below the week and below these two the ones which will be grown should take place.On the row I would like to add amount divided viol number.I mean Iwould like to see the total numberby dividing amount to viol.
Thanks for your interest

WEEKS
1,2,3,4,....53

A TABLE
-------
TUR DUEDATE BEGDATE VIOL AMOUNT
--- ------- --------- ----- --------
TOMATO 25.03.2005 02.01.2005 100 1500
BIBER 15.02.2005 01.01.2005 200 2000
.... .... .....


WEEK 1 WEEK 2 ..... WEEK 53
------- ------ ------ -------
begdate(SUM)
DUEDATE(SUM)


gpl
Posting Yak Master

195 Posts

Posted - 2005-02-23 : 17:54:53
You want a crosstab -- see this article, it works very well
http://www.sqlteam.com/item.asp?ItemID=2955
Graham
Go to Top of Page
   

- Advertisement -