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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-26 : 08:49:35
|
| Mano writes "have a small problem!I have recieved a txt file with some 1000 addresses in the following format:File As: Mano NomoFirst Name: ManoMiddle Name: JohnLast Name: NomoHome Address Street: blah blahHome Address City: blahHome Address Country: UsaWork Tel: (333) 9751442Work Fax: (333) 2412562Mobile tel: (999)2356489email: harleyd@ausi.comBirthday: NoneAnniversary: NonePager: (333) 9812601and the next adress is after this one in the same format! and so one until 1000 of them.The Question is: How can i import this to SQL ???So that the table looks like:File As | First Name | Middle Name | Last Name |Mano Nomo Mano john NomoIs there any way how i can do this, am still new with SQLThank you !!!" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-07-26 : 09:06:12
|
| The first thing you should do is try to get your provider to give you a more workable format.Get ready for a real struggle.You can probably create a format file that specifies a line feed as the column delimiter and line feed + "File As:" as the row delimiter...you'll have to play with it. Then you can pump this all into a staging table and write some queries to get rid of the 'First Name:','Last Name:'....text...<O> |
 |
|
|
|
|
|