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 |
|
OldMySQLUser
Constraint Violating Yak Guru
301 Posts |
Posted - 2008-03-12 : 15:55:29
|
I have a table which contains associated records which contain a sequence number:id name sequence text1 text2 text3 text4-- ---- -------- ----- ----- ----- -----101 Smith 1 Here is some text214 Brown 1 Some text null null 101 Smith 2 which I have input101 Smith 3 for you null null342 White 1 A little proseI want to create a new table and input records from the original table so that any records which contain sequence numbers greater than 1 have the text field(s) concantenated. This will need the text to be trimmed first, as there may be unwanted trailing spaces due to a previous csv file conversion.The new table will be:id name text-- ---- ----101 Smith Here is some text which I have input for you214 Brown Some text342 White A little proseHow can I accomplish this please? This is beyond my current ability. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-03-12 : 15:58:55
|
| http://weblogs.sqlteam.com/mladenp/archive/2007/06/01/60220.aspx_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
|
|
|