question

Vedamurthy avatar image
Vedamurthy asked

BCP is throwing error as Invalid character value for cast specification

Hi, I am New to SQL server. I am trying to load a file from UNIX to SQL Server . When i run the BCP getting the below error but i was able to load the same file when i changed the datatype to Char. Here is the error - #@ Row 1, Column 7: Invalid character value for cast specification @# 111 2018-01-04 N XXX 2018-01-04 XXX 2018-01-04 222 2018-01-04|N|XXX|2018-01-04|XXX|2018-01-04 BCP bcp [SQLAAA].[APP_XXX].[ACTIVITY_V1] in /home/ XXX_ACTIVITY.txt -c -S xddb001 -e /home/ERRORS.log -t "|" -r "\n" -E -U test12 -P test12 DDL CREATE TABLE [APP_XX].[ACTIVITY] ( [C1] [varchar](10) NOT NULL, [C2_DATE] [date] NOT NULL, [c3] [varchar](1) NULL, [C4_NM] [varchar](10) NULL, [C5_DTM] [date] NULL, [C6_NM] [varchar](10) NULL, [C7_DTM] [date] NULL, [ROW_ID] [bigint] IDENTITY(1,1) NOT NULL ) ON [PRIMARY] Could you please let me know what modification can be done. Regards Vedamurthy
bcp
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.