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 |
|
MikeBrenner
Starting Member
1 Post |
Posted - 2002-08-29 : 11:41:45
|
| We have a very large file (approx 500,000) records that we are attempting to import into an existing database. The old records come from an AS400 and each record was split up into several rows (with several rows acutally completing the one record). The layout is as follows:Record 1 Customer - 55551 ID - 112 Order - 1 Text - Start of noteRecord 2 Customer - 55551 ID - 112 Order - 2 Text - next lineRecord 3 Customer - 55551 ID - 113 Order - 1 Text - Next NoteWhat we need to do is to insert these new records into a new table with the text of the notes combined..Record 1 Customer - 55551 ID - 112 Order - 1 (does not need to be imported) Text - Start of note next lineThis will do 2 things, reduce the number of rows, and make the selection of these records easier for the users.Does anyone have any ideas as to how we can combine this line on insert?? |
|
|
royv
Constraint Violating Yak Guru
455 Posts |
Posted - 2002-08-30 : 10:26:25
|
| I would create a temp table to BULK INSERT the data into, and to then massage the data via an INSERT SELECT statement to get the data into your table the way you want. If you are using SQL 2000, instead of temp tables use table variables.*************************Someone done told you wrong! |
 |
|
|
|
|
|