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.
| Author |
Topic |
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-08-05 : 05:11:23
|
Hi all,I have the following table :MemberKey, Comment1, 'Joined Scheme'1, 'Left Scheme'1, 'Rejoined Scheme'2, 'Joined Benefit'2, 'Salary increase'etc...What I would like is to add another column SUBJECT which will hold something like CONV01, CONV02 etcSo we will have :MemberKey, Comment, SUBJECT1, 'Joined Scheme',CONV011, 'Left Scheme', CONV021, 'Rejoined Scheme', CONV032, 'Joined Benefit', CONV012, 'Salary increase', CONV02etc..Suggestions? (non cursor solutions of course kuz like, that's too easy )----------------Shadow to Light |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2003-08-05 : 05:36:49
|
| Hi Amethystium!! :)update t set subject = 'conv' +(select count(*) from t tt where tt.memberkey=t.memberkey andtt.comment <= t.comment)- Vit |
 |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-08-05 : 05:56:07
|
Thanks Vit!How is the plant programming doing?Any new leaves yet? ----------------Shadow to Light |
 |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2003-08-05 : 06:06:55
|
| Wow!! How did you guess?Just yesterday I bought a rhododendron bushlet...- Vit |
 |
|
|
|
|
|
|
|