当前位置: 首页 > 面试题库 >

将5 gig文件导入表时出错

宫弘亮
2023-03-14
问题内容

我正在尝试将大量插入表:

use SalesDWH

go


BULK INSERT dbo.npi
 FROM 'S:\tmp\npi.csv' WITH (FIELDTERMINATOR=',',ROWTERMINATOR='\n',lastrow=200,firstrow=2)

并得到此错误:

Msg 4866, Level 16, State 8, Line 3
The bulk load failed. The column is too long in the data file for row 1, column 329. Verify that the field terminator and row terminator are specified correctly.
Msg 7301, Level 16, State 2, Line 3
Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)".

我也尝试使用sql导入和导出向导来导入文件。它以逗号分隔,并且出现以下错误:

Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Other Provider Identifier Issuer_5" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 (SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The "output column "Other Provider Identifier Issuer_5" (514)" failed because truncation occurred, and the truncation row disposition on "output column "Other Provider Identifier Issuer_5" (514)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)

Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "S:\tmp\nppes\npidata_20050523-20111114.csv" on data row 79.
 (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - npidata_20050523-20111114_csv" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard)

我知道我的领域绝对足够大。这是表的create语句:

USE [SalesDWH]
GO

/****** Object:  Table [dbo].[npi]    Script Date: 12/30/2011 15:28:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[npi](
    [NPI] [varchar](80) NULL,
    [Entity Type Code] [varchar](80) NULL,
    [Replacement NPI] [varchar](80) NULL,
    [Employer Identification Number (EIN)] [varchar](80) NULL,
    [Provider Organization Name (Legal Business Name)] [varchar](80) NULL,
    [Provider Last Name (Legal Name)] [varchar](80) NULL,
    [Provider First Name] [varchar](80) NULL,
    [Provider Middle Name] [varchar](80) NULL,
    [Provider Name Prefix Text] [varchar](80) NULL,
    [Provider Name Suffix Text] [varchar](80) NULL,
    [Provider Credential Text] [varchar](80) NULL,
    [Provider Other Organization Name] [varchar](80) NULL,
    [Provider Other Organization Name Type Code] [varchar](80) NULL,
    [Provider Other Last Name] [varchar](80) NULL,
    [Provider Other First Name] [varchar](80) NULL,
    [Provider Other Middle Name] [varchar](80) NULL,
    [Provider Other Name Prefix Text] [varchar](80) NULL,
    [Provider Other Name Suffix Text] [varchar](80) NULL,
    [Provider Other Credential Text] [varchar](80) NULL,
    [Provider Other Last Name Type Code] [varchar](80) NULL,
    [Provider First Line Business Mailing Address] [varchar](80) NULL,
    [Provider Second Line Business Mailing Address] [varchar](80) NULL,
    [Provider Business Mailing Address City Name] [varchar](80) NULL,
    [Provider Business Mailing Address State Name] [varchar](80) NULL,
    [Provider Business Mailing Address Postal Code] [varchar](80) NULL,
    [Provider Business Mailing Address Country Code (If outside U S )] [varchar](80) NULL,
    [Provider Business Mailing Address Telephone Number] [varchar](80) NULL,
    [Provider Business Mailing Address Fax Number] [varchar](80) NULL,
    [Provider First Line Business Practice Location Address] [varchar](80) NULL,
    [Provider Second Line Business Practice Location Address] [varchar](80) NULL,
    [Provider Business Practice Location Address City Name] [varchar](80) NULL,
    [Provider Business Practice Location Address State Name] [varchar](80) NULL,
    [Provider Business Practice Location Address Postal Code] [varchar](80) NULL,
    [Provider Business Practice Location Address Country Code (If outside U S )] [varchar](80) NULL,
    [Provider Business Practice Location Address Telephone Number] [varchar](80) NULL,
    [Provider Business Practice Location Address Fax Number] [varchar](80) NULL,
    [Provider Enumeration Date] [varchar](80) NULL,
    [Last Update Date] [varchar](80) NULL,
    [NPI Deactivation Reason Code] [varchar](80) NULL,
    [NPI Deactivation Date] [varchar](80) NULL,
    [NPI Reactivation Date] [varchar](80) NULL,
    [Provider Gender Code] [varchar](80) NULL,
    [Authorized Official Last Name] [varchar](80) NULL,
    [Authorized Official First Name] [varchar](80) NULL,
    [Authorized Official Middle Name] [varchar](80) NULL,
    [Authorized Official Title or Position] [varchar](80) NULL,
    [Authorized Official Telephone Number] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_1] [varchar](80) NULL,
    [Provider License Number_1] [varchar](80) NULL,
    [Provider License Number State Code_1] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_1] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_2] [varchar](80) NULL,
    [Provider License Number_2] [varchar](80) NULL,
    [Provider License Number State Code_2] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_2] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_3] [varchar](80) NULL,
    [Provider License Number_3] [varchar](80) NULL,
    [Provider License Number State Code_3] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_3] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_4] [varchar](80) NULL,
    [Provider License Number_4] [varchar](80) NULL,
    [Provider License Number State Code_4] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_4] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_5] [varchar](80) NULL,
    [Provider License Number_5] [varchar](80) NULL,
    [Provider License Number State Code_5] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_5] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_6] [varchar](80) NULL,
    [Provider License Number_6] [varchar](80) NULL,
    [Provider License Number State Code_6] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_6] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_7] [varchar](80) NULL,
    [Provider License Number_7] [varchar](80) NULL,
    [Provider License Number State Code_7] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_7] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_8] [varchar](80) NULL,
    [Provider License Number_8] [varchar](80) NULL,
    [Provider License Number State Code_8] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_8] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_9] [varchar](80) NULL,
    [Provider License Number_9] [varchar](80) NULL,
    [Provider License Number State Code_9] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_9] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_10] [varchar](80) NULL,
    [Provider License Number_10] [varchar](80) NULL,
    [Provider License Number State Code_10] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_10] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_11] [varchar](80) NULL,
    [Provider License Number_11] [varchar](80) NULL,
    [Provider License Number State Code_11] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_11] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_12] [varchar](80) NULL,
    [Provider License Number_12] [varchar](80) NULL,
    [Provider License Number State Code_12] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_12] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_13] [varchar](80) NULL,
    [Provider License Number_13] [varchar](80) NULL,
    [Provider License Number State Code_13] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_13] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_14] [varchar](80) NULL,
    [Provider License Number_14] [varchar](80) NULL,
    [Provider License Number State Code_14] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_14] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Code_15] [varchar](80) NULL,
    [Provider License Number_15] [varchar](80) NULL,
    [Provider License Number State Code_15] [varchar](80) NULL,
    [Healthcare Provider Primary Taxonomy Switch_15] [varchar](80) NULL,
    [Other Provider Identifier_1] [varchar](80) NULL,
    [Other Provider Identifier Type Code_1] [varchar](80) NULL,
    [Other Provider Identifier State_1] [varchar](80) NULL,
    [Other Provider Identifier Issuer_1] [varchar](80) NULL,
    [Other Provider Identifier_2] [varchar](80) NULL,
    [Other Provider Identifier Type Code_2] [varchar](80) NULL,
    [Other Provider Identifier State_2] [varchar](80) NULL,
    [Other Provider Identifier Issuer_2] [varchar](80) NULL,
    [Other Provider Identifier_3] [varchar](80) NULL,
    [Other Provider Identifier Type Code_3] [varchar](80) NULL,
    [Other Provider Identifier State_3] [varchar](80) NULL,
    [Other Provider Identifier Issuer_3] [varchar](80) NULL,
    [Other Provider Identifier_4] [varchar](80) NULL,
    [Other Provider Identifier Type Code_4] [varchar](80) NULL,
    [Other Provider Identifier State_4] [varchar](80) NULL,
    [Other Provider Identifier Issuer_4] [varchar](80) NULL,
    [Other Provider Identifier_5] [varchar](80) NULL,
    [Other Provider Identifier Type Code_5] [varchar](80) NULL,
    [Other Provider Identifier State_5] [varchar](80) NULL,
    [Other Provider Identifier Issuer_5] [varchar](80) NULL,
    [Other Provider Identifier_6] [varchar](80) NULL,
    [Other Provider Identifier Type Code_6] [varchar](80) NULL,
    [Other Provider Identifier State_6] [varchar](80) NULL,
    [Other Provider Identifier Issuer_6] [varchar](80) NULL,
    [Other Provider Identifier_7] [varchar](80) NULL,
    [Other Provider Identifier Type Code_7] [varchar](80) NULL,
    [Other Provider Identifier State_7] [varchar](80) NULL,
    [Other Provider Identifier Issuer_7] [varchar](80) NULL,
    [Other Provider Identifier_8] [varchar](80) NULL,
    [Other Provider Identifier Type Code_8] [varchar](80) NULL,
    [Other Provider Identifier State_8] [varchar](80) NULL,
    [Other Provider Identifier Issuer_8] [varchar](80) NULL,
    [Other Provider Identifier_9] [varchar](80) NULL,
    [Other Provider Identifier Type Code_9] [varchar](80) NULL,
    [Other Provider Identifier State_9] [varchar](80) NULL,
    [Other Provider Identifier Issuer_9] [varchar](80) NULL,
    [Other Provider Identifier_10] [varchar](80) NULL,
    [Other Provider Identifier Type Code_10] [varchar](80) NULL,
    [Other Provider Identifier State_10] [varchar](80) NULL,
    [Other Provider Identifier Issuer_10] [varchar](80) NULL,
    [Other Provider Identifier_11] [varchar](80) NULL,
    [Other Provider Identifier Type Code_11] [varchar](80) NULL,
    [Other Provider Identifier State_11] [varchar](80) NULL,
    [Other Provider Identifier Issuer_11] [varchar](80) NULL,
    [Other Provider Identifier_12] [varchar](80) NULL,
    [Other Provider Identifier Type Code_12] [varchar](80) NULL,
    [Other Provider Identifier State_12] [varchar](80) NULL,
    [Other Provider Identifier Issuer_12] [varchar](80) NULL,
    [Other Provider Identifier_13] [varchar](80) NULL,
    [Other Provider Identifier Type Code_13] [varchar](80) NULL,
    [Other Provider Identifier State_13] [varchar](80) NULL,
    [Other Provider Identifier Issuer_13] [varchar](80) NULL,
    [Other Provider Identifier_14] [varchar](80) NULL,
    [Other Provider Identifier Type Code_14] [varchar](80) NULL,
    [Other Provider Identifier State_14] [varchar](80) NULL,
    [Other Provider Identifier Issuer_14] [varchar](80) NULL,
    [Other Provider Identifier_15] [varchar](80) NULL,
    [Other Provider Identifier Type Code_15] [varchar](80) NULL,
    [Other Provider Identifier State_15] [varchar](80) NULL,
    [Other Provider Identifier Issuer_15] [varchar](80) NULL,
    [Other Provider Identifier_16] [varchar](80) NULL,
    [Other Provider Identifier Type Code_16] [varchar](80) NULL,
    [Other Provider Identifier State_16] [varchar](80) NULL,
    [Other Provider Identifier Issuer_16] [varchar](80) NULL,
    [Other Provider Identifier_17] [varchar](80) NULL,
    [Other Provider Identifier Type Code_17] [varchar](80) NULL,
    [Other Provider Identifier State_17] [varchar](80) NULL,
    [Other Provider Identifier Issuer_17] [varchar](80) NULL,
    [Other Provider Identifier_18] [varchar](80) NULL,
    [Other Provider Identifier Type Code_18] [varchar](80) NULL,
    [Other Provider Identifier State_18] [varchar](80) NULL,
    [Other Provider Identifier Issuer_18] [varchar](80) NULL,
    [Other Provider Identifier_19] [varchar](80) NULL,
    [Other Provider Identifier Type Code_19] [varchar](80) NULL,
    [Other Provider Identifier State_19] [varchar](80) NULL,
    [Other Provider Identifier Issuer_19] [varchar](80) NULL,
    [Other Provider Identifier_20] [varchar](80) NULL,
    [Other Provider Identifier Type Code_20] [varchar](80) NULL,
    [Other Provider Identifier State_20] [varchar](80) NULL,
    [Other Provider Identifier Issuer_20] [varchar](80) NULL,
    [Other Provider Identifier_21] [varchar](80) NULL,
    [Other Provider Identifier Type Code_21] [varchar](80) NULL,
    [Other Provider Identifier State_21] [varchar](80) NULL,
    [Other Provider Identifier Issuer_21] [varchar](80) NULL,
    [Other Provider Identifier_22] [varchar](80) NULL,
    [Other Provider Identifier Type Code_22] [varchar](80) NULL,
    [Other Provider Identifier State_22] [varchar](80) NULL,
    [Other Provider Identifier Issuer_22] [varchar](80) NULL,
    [Other Provider Identifier_23] [varchar](80) NULL,
    [Other Provider Identifier Type Code_23] [varchar](80) NULL,
    [Other Provider Identifier State_23] [varchar](80) NULL,
    [Other Provider Identifier Issuer_23] [varchar](80) NULL,
    [Other Provider Identifier_24] [varchar](80) NULL,
    [Other Provider Identifier Type Code_24] [varchar](80) NULL,
    [Other Provider Identifier State_24] [varchar](80) NULL,
    [Other Provider Identifier Issuer_24] [varchar](80) NULL,
    [Other Provider Identifier_25] [varchar](80) NULL,
    [Other Provider Identifier Type Code_25] [varchar](80) NULL,
    [Other Provider Identifier State_25] [varchar](80) NULL,
    [Other Provider Identifier Issuer_25] [varchar](80) NULL,
    [Other Provider Identifier_26] [varchar](80) NULL,
    [Other Provider Identifier Type Code_26] [varchar](80) NULL,
    [Other Provider Identifier State_26] [varchar](80) NULL,
    [Other Provider Identifier Issuer_26] [varchar](80) NULL,
    [Other Provider Identifier_27] [varchar](80) NULL,
    [Other Provider Identifier Type Code_27] [varchar](80) NULL,
    [Other Provider Identifier State_27] [varchar](80) NULL,
    [Other Provider Identifier Issuer_27] [varchar](80) NULL,
    [Other Provider Identifier_28] [varchar](80) NULL,
    [Other Provider Identifier Type Code_28] [varchar](80) NULL,
    [Other Provider Identifier State_28] [varchar](80) NULL,
    [Other Provider Identifier Issuer_28] [varchar](80) NULL,
    [Other Provider Identifier_29] [varchar](80) NULL,
    [Other Provider Identifier Type Code_29] [varchar](80) NULL,
    [Other Provider Identifier State_29] [varchar](80) NULL,
    [Other Provider Identifier Issuer_29] [varchar](80) NULL,
    [Other Provider Identifier_30] [varchar](80) NULL,
    [Other Provider Identifier Type Code_30] [varchar](80) NULL,
    [Other Provider Identifier State_30] [varchar](80) NULL,
    [Other Provider Identifier Issuer_30] [varchar](80) NULL,
    [Other Provider Identifier_31] [varchar](80) NULL,
    [Other Provider Identifier Type Code_31] [varchar](80) NULL,
    [Other Provider Identifier State_31] [varchar](80) NULL,
    [Other Provider Identifier Issuer_31] [varchar](80) NULL,
    [Other Provider Identifier_32] [varchar](80) NULL,
    [Other Provider Identifier Type Code_32] [varchar](80) NULL,
    [Other Provider Identifier State_32] [varchar](80) NULL,
    [Other Provider Identifier Issuer_32] [varchar](80) NULL,
    [Other Provider Identifier_33] [varchar](80) NULL,
    [Other Provider Identifier Type Code_33] [varchar](80) NULL,
    [Other Provider Identifier State_33] [varchar](80) NULL,
    [Other Provider Identifier Issuer_33] [varchar](80) NULL,
    [Other Provider Identifier_34] [varchar](80) NULL,
    [Other Provider Identifier Type Code_34] [varchar](80) NULL,
    [Other Provider Identifier State_34] [varchar](80) NULL,
    [Other Provider Identifier Issuer_34] [varchar](80) NULL,
    [Other Provider Identifier_35] [varchar](80) NULL,
    [Other Provider Identifier Type Code_35] [varchar](80) NULL,
    [Other Provider Identifier State_35] [varchar](80) NULL,
    [Other Provider Identifier Issuer_35] [varchar](80) NULL,
    [Other Provider Identifier_36] [varchar](80) NULL,
    [Other Provider Identifier Type Code_36] [varchar](80) NULL,
    [Other Provider Identifier State_36] [varchar](80) NULL,
    [Other Provider Identifier Issuer_36] [varchar](80) NULL,
    [Other Provider Identifier_37] [varchar](80) NULL,
    [Other Provider Identifier Type Code_37] [varchar](80) NULL,
    [Other Provider Identifier State_37] [varchar](80) NULL,
    [Other Provider Identifier Issuer_37] [varchar](80) NULL,
    [Other Provider Identifier_38] [varchar](80) NULL,
    [Other Provider Identifier Type Code_38] [varchar](80) NULL,
    [Other Provider Identifier State_38] [varchar](80) NULL,
    [Other Provider Identifier Issuer_38] [varchar](80) NULL,
    [Other Provider Identifier_39] [varchar](80) NULL,
    [Other Provider Identifier Type Code_39] [varchar](80) NULL,
    [Other Provider Identifier State_39] [varchar](80) NULL,
    [Other Provider Identifier Issuer_39] [varchar](80) NULL,
    [Other Provider Identifier_40] [varchar](80) NULL,
    [Other Provider Identifier Type Code_40] [varchar](80) NULL,
    [Other Provider Identifier State_40] [varchar](80) NULL,
    [Other Provider Identifier Issuer_40] [varchar](80) NULL,
    [Other Provider Identifier_41] [varchar](80) NULL,
    [Other Provider Identifier Type Code_41] [varchar](80) NULL,
    [Other Provider Identifier State_41] [varchar](80) NULL,
    [Other Provider Identifier Issuer_41] [varchar](80) NULL,
    [Other Provider Identifier_42] [varchar](80) NULL,
    [Other Provider Identifier Type Code_42] [varchar](80) NULL,
    [Other Provider Identifier State_42] [varchar](80) NULL,
    [Other Provider Identifier Issuer_42] [varchar](80) NULL,
    [Other Provider Identifier_43] [varchar](80) NULL,
    [Other Provider Identifier Type Code_43] [varchar](80) NULL,
    [Other Provider Identifier State_43] [varchar](80) NULL,
    [Other Provider Identifier Issuer_43] [varchar](80) NULL,
    [Other Provider Identifier_44] [varchar](80) NULL,
    [Other Provider Identifier Type Code_44] [varchar](80) NULL,
    [Other Provider Identifier State_44] [varchar](80) NULL,
    [Other Provider Identifier Issuer_44] [varchar](80) NULL,
    [Other Provider Identifier_45] [varchar](80) NULL,
    [Other Provider Identifier Type Code_45] [varchar](80) NULL,
    [Other Provider Identifier State_45] [varchar](80) NULL,
    [Other Provider Identifier Issuer_45] [varchar](80) NULL,
    [Other Provider Identifier_46] [varchar](80) NULL,
    [Other Provider Identifier Type Code_46] [varchar](80) NULL,
    [Other Provider Identifier State_46] [varchar](80) NULL,
    [Other Provider Identifier Issuer_46] [varchar](80) NULL,
    [Other Provider Identifier_47] [varchar](80) NULL,
    [Other Provider Identifier Type Code_47] [varchar](80) NULL,
    [Other Provider Identifier State_47] [varchar](80) NULL,
    [Other Provider Identifier Issuer_47] [varchar](80) NULL,
    [Other Provider Identifier_48] [varchar](80) NULL,
    [Other Provider Identifier Type Code_48] [varchar](80) NULL,
    [Other Provider Identifier State_48] [varchar](80) NULL,
    [Other Provider Identifier Issuer_48] [varchar](80) NULL,
    [Other Provider Identifier_49] [varchar](80) NULL,
    [Other Provider Identifier Type Code_49] [varchar](80) NULL,
    [Other Provider Identifier State_49] [varchar](80) NULL,
    [Other Provider Identifier Issuer_49] [varchar](80) NULL,
    [Other Provider Identifier_50] [varchar](80) NULL,
    [Other Provider Identifier Type Code_50] [varchar](80) NULL,
    [Other Provider Identifier State_50] [varchar](80) NULL,
    [Other Provider Identifier Issuer_50] [varchar](80) NULL,
    [Is Sole Proprietor] [varchar](80) NULL,
    [Is Organization Subpart] [varchar](80) NULL,
    [Parent Organization LBN] [varchar](80) NULL,
    [Parent Organization TIN] [varchar](80) NULL,
    [Authorized Official Name Prefix Text] [varchar](80) NULL,
    [Authorized Official Name Suffix Text] [varchar](80) NULL,
    [Authorized Official Credential Text] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_1] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_2] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_3] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_4] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_5] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_6] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_7] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_8] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_9] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_10] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_11] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_12] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_13] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_14] [varchar](80) NULL,
    [Healthcare Provider Taxonomy Group_15] [varchar](80) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

我肯定知道没有超过80个字符的列。我也尝试将其更改为500个字符,但仍然遇到相同的错误。

我究竟做错了什么?

为什么不能导入此文件?

这是以下行之一的示例:“ 139236748349”,“ 1”,“”,“,”,“”,“ GRUrt3NERT”,“ GEORGE”,“ M”,“
DR。”,“”,“ MD” ,“”,“”,“”,“”,“”,“”,“”,“”,“”,“ 7234900 FANNIN ST”,“ SUITE
4423400”,“休斯顿”,“ TX”,“ 770523442900” ,“ US”,“ 713334351227000”,“
713g25127082”,“ 792300 FANNIN ST”,“ SUITE 423400”,“休斯敦”,“ TX”,“
7705ef242900”,“ US”,“ 7132225127000”,“ 713512ff27082”,“ 05 / 23/2005“,”
01/22/2009“,”“,”“,”“,” M“,”“,”“,”“,”“,”“,” 207VE0f2f102X“,” E02f945“,” TX“,”
Y“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“
,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“
“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”
“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“ 82f4380J”,“ 04”,“ TX”,“ FT.BEND /
MONT”,“ B2f33159”,“ 02”,“ TX”,“”,“ 8432335J”,“ 04”,“ TX”,“ BRAZORIA”,“
8dd2047G”,“ 01”,“ TX “,”蓝色十字和蓝色盾牌“,” 84sd2282J“,” 04“,” TX“,” HARRIS
COUNTY“,”“,”“,”“,”“,”,“,”,“,”,“,”
,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“
“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”““,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”
“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“
“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”““,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”
“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”
,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“
“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”“,”““,”“,”“,”“,”“,”“,”“,”“,”
N“,”“,”“,”“,”“,”“,”“,”“,”“,”“ ,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”

只是更新…我将所有字段更改为 nvarchar(max)

仍然出现这个可怕的错误:

Operation stopped...

- Initializing Data Flow Task (Success)

- Initializing Connections (Success)

- Setting SQL Command (Success)

- Setting Source Connection (Success)

- Setting Destination Connection (Success)

- Validating (Success)
    Messages
    * Warning 0x80049304: Data Flow Task 1: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available.  To resolve, run this package as an administrator, or on the system's console.
     (SQL Server Import and Export Wizard)


- Prepare for Execute (Success)

- Pre-execute (Success)
    Messages
    * Information 0x402090dc: Data Flow Task 1: The processing of file "S:\tmp\nppes\npidata_20050523-20111114.csv" has started.
     (SQL Server Import and Export Wizard)


- Executing (Error)
    Messages
    * Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Other Provider Identifier Issuer_5" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
     (SQL Server Import and Export Wizard)

    * Error 0xc020902a: Data Flow Task 1: The "output column "Other Provider Identifier Issuer_5" (514)" failed because truncation occurred, and the truncation row disposition on "output column "Other Provider Identifier Issuer_5" (514)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
     (SQL Server Import and Export Wizard)

    * Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "S:\tmp\nppes\npidata_20050523-20111114.csv" on data row 79.
     (SQL Server Import and Export Wizard)

    * Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - npidata_20050523-20111114_csv" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)


- Copying to [dbo].[npidata_20050523-20111114] (Stopped)

- Post-execute (Success)
    Messages
    * Information 0x402090dd: Data Flow Task 1: The processing of file "S:\tmp\nppes\npidata_20050523-20111114.csv" has ended.
     (SQL Server Import and Export Wizard)

    * Information 0x402090df: Data Flow Task 1: The final commit for the data insertion in "component "Destination - npidata_20050523-20111114" (1326)" has started.
     (SQL Server Import and Export Wizard)

    * Information 0x402090e0: Data Flow Task 1: The final commit for the data insertion  in "component "Destination - npidata_20050523-20111114" (1326)" has ended.
     (SQL Server Import and Export Wizard)

    * Information 0x4004300b: Data Flow Task 1: "component "Destination - npidata_20050523-20111114" (1326)" wrote 58 rows.
     (SQL Server Import and Export Wizard)

问题答案:

我看到您使用了导入向导(它会构建一个SSIS包)。

您可以尝试使用SSIS加载此文件:

  • 进行数据流任务
  • 制作平面文件源,指向csv。根据您的配置设置参数
  • 设置错误输出以在截断时重定向行
  • 在错误输出上添加一个数据读取器目标,在数据读取器的路径上附加一个数据查看器。
  • 将常规输出发送到另一个数据读取器
  • 运行程序包

现在,您应该查看是否由于某些原因SSIS(导入)“认为”有超过80个字符的任何行。您应该很快就能识别出错误。

另外,如果csv文件中有329列,请检查您的行终止符?



 类似资料:
  • 我试图将一个目录中的几个csv文件读入pandas,并将它们连接到一个大数据帧中,但出现以下错误: 这是我的密码 我不知道为什么它不起作用。我试图用chmod解决这个问题,但一切都变了

  • 这个问题涉及一个运行在Ubuntu12.04上的Eclipse Kepler实例。我有一个用例图,我需要将它作为图像文件包含在文档中。我右键点击.di文件,选择导出所有图...然后选择PDF作为文件格式。作为回报,我将得到一个错误窗口,其中包含以下内容: 会话数据: eclipse.buildid=4.3.2.M20140221-1700 java.version=1.6.0_26 java.ve

  • 在我的项目中已经安装了opencv,但是导入的C++文件出现了错误 null

  • 当我将从开源网站(如Apache,Github)下载的导入时,发生了几个错误:(.注意,所有Maven项目都可以在Eclipse下正确编译和测试。 首先,在将maven项目导入到Eclipse之后,项目图标上将出现,但是项目中没有错误。我发现在文件中存在节点。我删除了节点,然后错误就消失了,我想知道为什么,因为maven项目中没有模块。下面的代码是我之前删除的节点。

  • 问题内容: 我有一个在Amazon RDS中运行的mysql数据库,我想知道如何将整个表导出为csv格式。我目前在Windows上使用mysql服务器查询Amazon数据库,但是当我尝试运行导出时,我得到一个错误,可能是因为没有用于Amazon RDS的专用文件服务器。有什么解决办法吗? 问题答案: 大概您正在尝试通过查询从Amazon RDS数据库导出,这会引起这个确实常见的问题,请参阅例如将数

  • 问题内容: 更新 在我发布此问题之后的第二秒,由于对结果查询的语法突出显示,我看到了出了什么问题:该字符串未以闭合斜线开头。现在我将其更改为: 但是,这提出了一个新问题:为什么PDO对象没有为此向我吐出错误?手动执行查询肯定会返回一个错误,指出没有名为的字段,最后是逗号。为什么我没有收到任何错误?有任何想法吗? PS:关于解决我的问题的SO语法突出显示方面有什么想法吗?:-) 我将原始问题留作参考