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 2005 Forums
 Transact-SQL (2005)
 Case sequence and display as columns

Author  Topic 

Roomurray
Starting Member

4 Posts

Posted - 2011-04-07 : 05:02:05
Hi

Is it possible for me to do the following:

Custid Part Ordernum Relnum
ABC123 A 10 1
ABC123 B 20 1
ABC123 A 20 2
BBC123 A 30 1

I want to group the above and give a sequential number where the columns match and then use it in a separate case startment to show the due date of the related order against the cust/part ie:

CustID Part Seqnum1 seqnum2 etc etc
ABC123 A 1/1/2001 2/1/2001
ABC123 B 1/3/2001
BBC123 A 2/1/2001



   

- Advertisement -