Hi, I'm running simple bulk insert and having this problem with setup like below
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Tmsg] ( --ESEventlogMain1](
[msgnumber] [int] NULL,
[msgttype] [int] NULL,
[mmsg] [varchar] (20) NULL
) ON [PRIMARY]
---------------------------testx.txt
11111;2;The status for service
22222;2;Host ADM104 (ADM Group)
33333;2;The status for service
---------------------------
BULK INSERT Tmsg FROM 'C:\Users\memb1\testx.txt'
WITH (FIELDTERMINATOR = ';', rowterminator = '\n')
--------------------------
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 (msgnumber).
---------------------------
select * from tmsg
msgnumber msgttype mmsg
----------- ----------- ----------------------------------------
22222 2 Host ADM104 (ADM Group)
33333 2 The status for service