views:

39

answers:

2

hi. im currently want to inport my data from flat file to the database.

the flat file is in a txt file. in that txt file, i save a list of URLs. example:

http://www.mimi.com/Hotels-g303188-Rurrenabaque-Hotels.html

im using the SQL Server Import and Export wizard to do it. but when the time of execution, it has error saying

Error 0xc02020a1: 
Data Flow Task 1: Data conversion failed. The data conversion for column 
"Column 0" returned status value 4 and status text "Text was truncated or one 
or more characters had no match in the target code page.".

can anyone help?..

+2  A: 

You get this error because the text is too long for the column youve chosen to put it in.

Brimstedt
thnks for the comment..but how to fix it??..
newBie
Make the column larger: ALTER your TABLE and put assign more characters for the column (eg VARCHAR(32) to VARCHAR(255)) or put another column type (eg TEXT)
Konerak
and on the import data wizard, also make sure to select a length that is long enough for your data contents - it often tends to default to 30 or 60 characters or something which might be too short for your text
marc_s
+1  A: 

Text was truncated or

You might want to check the size of the database column vis-a-vis your input data. Does the longest URL less than the column width?

one or more characters had no match in the target code page.".

Check if your input file has any special characters. An easy way to check this would be to save your file in ANSI (Notepad > Save As > Encoding = ANSI). Note - you'd still have to select the right code page so that the import interprets your input text correctly.

Here's a very nice link that has some background on what code pages are - http://www.joelonsoftware.com/articles/Unicode.html

potatopeelings