I face a problem wich is when try to bulk insert give me the following error
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 1 (x).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 1 (x).
Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 1 (x).
the target table and source table have the same datatype
for example
CREATE TABLE [try] (
[x] [int] NULL ,
[y] [char] (10)
) ON [PRIMARY]
GO
the bcp bulc copy I use is :
bcp master.bcp.%1 out c:\%1.txt -N -S1.1.1.1 -UXXX -PXXX -C1252 -r -t,
the bulk insert code is :
BULK INSERT [try]
FROM 'c:\try.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
example of the data in the source table
1 ,Ali
2, Mahmoud
Any help please