March 31, 2016 at 1:59 pm
Trying to run a bulk load:
INSERT INTO ICE_ContractPriceLimit(ReinsuranceYear,
RecordTypeCode,
CommodityYear,
CommodityCode,
InsurancePlanCode,
StateCode,
CountyCode,
SubCountyCode,
TypeCode,
PracticeCode,
InsuranceOptionCode,
MaximumContractPrice,
CommodityTypeCode,
ClassCode,
SubClassCode,
IntendedUseCode,
OrganicPracticeCode,
CroppingPracticeCode,
IrrigationPracticeCode,
IntervalCode,
ReleasedDate,
LastReleasedDate,
DeletedDate,
WANumber)
SELECT ReinsuranceYear,
RecordTypeCode,
CommodityYear,
CommodityCode,
InsurancePlanCode,
StateCode,
CountyCode,
COALESCE(SubCountyCode, ''),
TypeCode,
PracticeCode,
COALESCE(InsuranceOptionCode, ''),
COALESCE(MaximumContractPrice, 0),
CommodityTypeCode,
ClassCode,
SubClassCode,
IntendedUseCode,
OrganicPracticeCode,
CroppingPracticeCode,
IrrigationPracticeCode,
IntervalCode,
ReleasedDate,
LastReleasedDate,
DeletedDate,
WANumber
FROM OPENROWSET(BULK 'D:\Bulk Insert\APP-12286.txt', FORMATFILE='D:\Bulk Insert\APP-12286FileFormat.txt') AS t1;
And I'm getting the following error:
Msg 4861, Level 16, State 1, Line 12
Cannot bulk load because the file "D:\Bulk Insert\APP-12286.txt" could not be opened. Operating system error code 3(The system cannot find the path specified.).
I'm just running it from a Query Windows in Management Studio and the path is on the local machine. Any thoughts on where I am going wrong?
March 31, 2016 at 2:03 pm
Is the file path local to the client, or the server?
March 31, 2016 at 2:06 pm
Ah I see I am trying to use a local path and run it from the server...thanks
March 31, 2016 at 2:34 pm
I recommend ALWAYS using UNC paths.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply