| Author |
Topic |
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-18 : 23:15:24
|
| Guys,I got an error running this sripts with bulk insert.may i know what cause this error.Here is my scriptsBulk Insert #VPTableFrom 'C:\Material Planning\VP309130.csv'With(DATAFILETYPE = 'char',FieldTerminator = ',',CODEPAGE = 'OEM',KEEPNULLS,RowTerminator = '\n', FirstRow = 1)ERRORMsg 4861, Level 16, State 1, Line 3Cannot bulk load because the file "C:\Material Planning\VP309130.csv" could not be opened. Operating system error code 3(The system cannot find the path specified.).Thanks.JOV |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-10-18 : 23:27:18
|
is the file in your local PC or the Server ? It need to be residing on the server C:\Material Planning KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-19 : 01:06:11
|
| this was residing to my local drive (C:/). |
 |
|
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-19 : 01:29:53
|
| Btw, im using to login windows authentication not SQL server authentication. maybe this issuehave a problem and also the folder that pointing to access by bulk insert. |
 |
|
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-19 : 02:22:15
|
| Solved.anyway, i have additional query.I would like to removed this P300-1110- and -Ui will retain only INCREDIBLE. can you please help me to do this in script. This are the data:P300-1110-C731-UP300-1110-INCREDIBLE-UP300-1710-DROID2GLBL-UP300-1710-DROID2-UThank you in Advance.jov |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-10-19 : 04:20:19
|
[code]where data like '%INCREDIBLE%'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-19 : 04:32:29
|
| I mean how to removed the first 10 char and the last 2 char(-U).SKU--------------------P300-1110-C731-UP300-1110-INCREDIBLE-UP300-1710-DEVOUR-UP300-1710-DROID2-UP300-4410-THUNDRBLT4G-UP333-4110-8530-Uresult:-----------------C731INCREDIBLEDEVOURDROID2THUNDRBLT4G8530Thanks. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
Villanuev
Constraint Violating Yak Guru
478 Posts |
Posted - 2011-10-19 : 05:30:22
|
| Thanks. |
 |
|
|
|