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 |
|
vmtailor
Starting Member
4 Posts |
Posted - 2005-03-02 : 18:24:09
|
| Hi Guys!I am a student, so very beginging level. as part of our assignment we have been asked to import the data from text file which got fillowing format. I don't know how to say the rows are seperated-------------------------------------------------------------------------------------| Emp# | Stud# | SIN | camp |-------------------------------------------------------------------------------------| 1 | 222333444 | 123-456-789 | SY |-------------------------------------------------------------------------------------| 2 | 777888999 | 323-434-343 | SY |-------------------------------------------------------------------------------------anybody can help. Thank You |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-03-02 : 19:39:32
|
| ------------------------------------------------------------------------------------- |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-02 : 19:41:14
|
| So what's the question?Tara |
 |
|
|
vmtailor
Starting Member
4 Posts |
Posted - 2005-03-02 : 19:46:57
|
| how to import using DTS what is the specification of the filehow to recognize the row and column? ignore ----- stuff |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-02 : 19:53:50
|
| Are you sure that the file has a row separator and that it isn't just being displayed like that to show that the rows on separate lines? That is very, very unusual to have especially for a class assignment. Does your book give you any examples that have row separators? I'm thinking you can import the data into a stage table that has one column, then parse the table using T_SQL, but that isn't going to be easy for a beginner.Tara |
 |
|
|
vmtailor
Starting Member
4 Posts |
Posted - 2005-03-02 : 20:03:18
|
| yes, there is the row seperator .as we are importing other file which dosn't show this seperator.but say if we take out the row seperator can we import it? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-02 : 20:05:57
|
| Yes. Then you'd just need to tell DTS that the columns are separated by | marks.Tara |
 |
|
|
vmtailor
Starting Member
4 Posts |
Posted - 2005-03-02 : 20:08:26
|
| ok. i will try that in lab. hope my teacher don't mind that.Thank you |
 |
|
|
|
|
|