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 |
|
donar
Starting Member
22 Posts |
Posted - 2006-01-24 : 12:14:49
|
| Hi guys, need your help again!I have a table,create table #temptable (ISN int, NTS varchar(7), start int, ends int)insert into #temptable (isn, nts, start, ends)select 1, '12C/01A', 2, 15unionselect 1, '12C/01A', 25, 101unionselect 1, '12D/07B', 11, 11unionselect 2, '10A/12C', 23, 25My question is, how can I get the query result like thisISN RESULT1 '12C/01A'(2-15, 25-101); '12D/07B' (11)2 '10A/12C' (23-25)Thanks for help. I do not want to use curser on this problem, is there other way to do it? |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
|
|
donar
Starting Member
22 Posts |
Posted - 2006-01-24 : 13:16:15
|
| Thanks for your reply. but I do not think it is just a problem of concatenation. There is group by too. How can I group by Isn,NTS and put the 'start-end' to the group they belong to? |
 |
|
|
|
|
|
|
|