将5 gig文件导入表时出错

时间:2011-12-30 23:30:18

标签: sql sql-server sql-server-2008

我正在尝试批量插入表格:

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”,“美国”,“713334351227000”,“ 713g25127082“,”792300 FANNIN ST“,”SUITE 423400“,”休斯顿“,”TX“,”7705ef242900“,”美国“,”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”,“BLUE CROSS& BLUE SHIELD”,“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)

5 个答案:

答案 0 :(得分:3)

我会通过外部脚本验证导致错误的行 - 比如一些快速的PowerShell。例如

$data = @(Import-Csv .\partialFile.csv )
$row = $data[0]

# how many columns do we have?
$row | gm -membertype NoteProperty | Measure-Object 

# columns larger than 80 chars
$row | gm -membertype NoteProperty | ? { ($row."$($_.Name)").Length -gt 80 } 

答案 1 :(得分:1)

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

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

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

您现在应该看看SSIS(导入)“认为”的行是否由于某种原因而超过80个字符。您应该能够快速识别出错误。

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

答案 2 :(得分:1)

根据您的表DDL,您可能在SQL中达到最大行大小8060。查看最高规格here

相反,我会尝试尽可能减小字段的大小。

答案 3 :(得分:1)

使用以下DDL创建一个表:

USE [YOUR_DATABASE]
GO

/****** Object:  Table [dbo].[YOUR_TABLE]    Script Date: 02/21/2012 14:07:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO

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

GO

SET ANSI_PADDING OFF
GO

使此表成为SSIS中数据流的输出。

祝你好运!这应该适用于我每月根据NPPES .CSV的导入更新我自己的SQL-Server(2008)目标表。

答案 4 :(得分:1)

你可能已经以不同的方式解决了这个问题,但它对我有用的方式是:

  1. 制作数据流任务
  2. 创建一个平面文件源,并将其指向CSV文件。
  3. 关闭DTS包,然后在编辑器中打开源文件。它本质上是一个描述包的内部工作的XML文件。
  4. 使用DTS搜索并替换DTS:MaximumWidth =“50”:MaximumWidth =“500”。
  5. 保存文件,然后重新打开DTS包。双击任务,在得到关于元数据不一致的一点警告后,你应该没问题。
  6. 创建OLE DB目标,并将箭头从源拖动到目标。要求它创建一个新的数据库表,它将所有字段都设置为varchar(500)。这应该足够宽,以便将所有字段都接收到临时表中。
  7. 运行您的包,看看它是如何工作的。
  8. 祝你好运!