question

NischalBadarinathKashyap-8458 avatar image
0 Votes"
NischalBadarinathKashyap-8458 asked OlafHelper-2800 commented

SQL Import Error

Hi all, Whe i try to import data from my ms excel file into my database table, I'm receiving the following error : Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column "F3" (21) to column "F3" (59). The conversion 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 "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[F3]" failed because truncation occurred, and the truncation row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[F3]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)
 Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion 0 - 0" (43) failed with error code 0xC020902A while processing input "Data Conversion Input" (44). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard) It has to be noted that the error is appearing at column F3. In my excel file, F3 is the column that contains text whose size can vary and I have given the respective attribute in my table as "text". There should not be any error in transferring this data. But yet I see the above message. This is happening to many of my other tables. Can I anyone provide me a lead on this? Thank You in Advance. Regards Nischal

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered OlafHelper-2800 commented

Text was truncated or one or more characters had no match in the target code page

That mean either
- You try to import larger data then it fit's into the table column; means e.g. column is defined as varchar(50) and the data contains more then 50 chars
- You try to import Unicode data into a ASCII column

So check table definition and source data if they match by definition & size.



· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Thank you for your response. I have tried with varchar(MAX) as well as text as type for my column attribute. Yet I'm facing this issue. I do not think the problem is with respect to size.

0 Votes 0 ·

"You try to import Unicode data into a ASCII column"

How do i check if this is happening?

0 Votes 0 ·
OlafHelper-2800 avatar image OlafHelper-2800 NischalBadarinathKashyap-8458 ·

You defined your column as varchar = ASCII, use NVarchar = Unicode instead.

See nchar and nvarchar (Transact-SQL)


0 Votes 0 ·
AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered NischalBadarinathKashyap-8458 commented

Hi NischalBadarinathKashyap-8458,
Was the SQL Server table you want to import data a new table?
If it is a new table, you can increase the size in the “select source tables and views” page -> click Edit Mapping, then increase size of column.
81103-01.jpg

If it is not, you can try to increase size of the column in the table.

Best Regards,
Amelia



01.jpg (98.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Amelia,

The sql table is already existing and I have my attributes type as text. So there should not be any problem with size. I have also tried with varchar(MAX) which also throws this error.

0 Votes 0 ·