| Author |
Topic |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-09-15 : 02:19:36
|
| i tried to import a text file to sql serverthis is the file :http://www.planetnana.co.il/pelegkurland/wg140906.txtthe strange thingthat i got only half of the rows!!!when i checked it closer i saw that it has imported 1 line and the next line not!!!how can this happen?maybe some char make this problem so i can import all the lines?maybe some char makes sql server to think that its endofline from its starts?thnaks in advancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-15 : 02:22:19
|
How do you import the text file ? BCP ? DTS ? KH |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-15 : 02:24:03
|
| Which meyhod did you use for importing the textfile?If possible, try to set FIRSTROW = 2 in the code you have.Peter LarssonHelsingborg, Sweden |
 |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-09-15 : 02:31:28
|
| i am doingright click o nthe DB->import data and then choose import filei can delete the first line if i makes a problem!Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-15 : 02:36:21
|
| Yes. The first line contains information about the file, created and so one.From Line 2 and to the end of file, all rows looks the same.Peter LarssonHelsingborg, Sweden |
 |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-09-15 : 02:44:19
|
| i deleted the first line and like a miracle it worked!!!still i dont get where is the diffrence!mysterious are the ways of god.....Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-15 : 02:53:22
|
"right click o nthe DB->import data and then choose import file"That's DTS. You can also specify number of rows to skip in one of the DTS screen. KH |
 |
|
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-09-15 : 02:54:13
|
| ow ok but still i cant understand how the first row massed it all upIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-15 : 03:00:45
|
quote: Originally posted by pelegk2 ow ok but still i cant understand how the first row massed it all upIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Can't tell from here . Most probably is the settings you specify while importing the text file. Maybe delimited vs fixed field ? Row delimiter ? KH |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-15 : 03:27:30
|
First three rows in the text file in link above00,WG256T01.PRN,WF ,060913,03715,183583,9194391203108791101085000820060910200709090310897110108400102006091020070909 Peter LarssonHelsingborg, Sweden |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-15 : 03:28:21
|
| I think you can check "Ignore first row" or "Skip first row" when importing through EM and DTS, I am not sure.Peter LarssonHelsingborg, Sweden |
 |
|
|
|