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
 General SQL Server Forums
 New to SQL Server Programming
 date functions

Author  Topic 

alapatisai1984
Starting Member

5 Posts

Posted - 2007-10-10 : 05:45:57
i have tables
customer id name address city
items itemid code itname cost
sales sid invno date cid amount (what are the sales done in date)
purchases pid invno date cid amount (what are the purchases done in date)

dsales dtsid sid code qty cost amount (detail of sales)
dpurchase dtpid pid code qty cost amount (details of purchases)


i want a query like

customer itemname jan feb march - - - - - - - - -
sai tv 1 2 0
nalini radio 0 2 1 ------------








sai krishna

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-10 : 05:50:25
Do a search for Pivot Queries here. You will find plenty of examples.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

alapatisai1984
Starting Member

5 Posts

Posted - 2007-10-10 : 06:14:43
how to divide year to months
Go to Top of Page
   

- Advertisement -