sql - Not Able to Insert Data into Database String or binary data would be truncated -
insert [cvsuat].[dbo].[userlevel ]( [client_id] ,[user_level_name] ,[user_level_description] ,[created_by] ,[created_date] ,[modified_by] ,[modified_date] ,[delete_flag] ,[deactivate_flag]) values ('sndbsndbsdnbsndbsnbdnsbdn23','client','','client','2013-03-12 21:31:38.437','client','2013-03-12 21:31:38.437','0','0')
msg 8152, level 16, state 4, line 1 string or binary info truncated. statement has been terminated.
note: table has space [userlevel ] made way before
this caused attempting set much info column.
the problem is, none of values specified in illustration big columns indicated in schema picture. i'd hence assume values you've given either aren't true values, or you've got trigger on table, causing error.
as aside, shouldn't delete_flag
, deactivate_flag
columns of datatype bit, rather char(1)
?
edit:
oh, , 1 more thing - client_id
nvarchar, want store unicode info in there. indicate in script, should utilize "n" prefix on strings, so:
insert [cvsuat].[dbo].[userlevel ]( [client_id] ,[user_level_name] ,[user_level_description] ,[created_by] ,[created_date] ,[modified_by] ,[modified_date] ,[delete_flag] ,[deactivate_flag]) values (n'sndbsndbsdnbsndbsnbdnsbdn23','client','','client','2013-03-12 21:31:38.437','client','2013-03-12 21:31:38.437','0','0')
sql sql-server-2008 insert
No comments:
Post a Comment