2015-06-06 73 views
0

当我运行此查询时,出现异常。SQL Server中将截断字符串或​​二进制数据

INSERT INTO nxt_conge 
      (id_user, 
      etat_conge, 
      date_debut_conge_h, 
      date_fin_conge_h, 
      date_debut_conge_m, 
      date_fin_conge_m, 
      tel_port, 
      id_user_replace, 
      remarque, 
      id_type_conge, 
      begin_time, 
      end_time, 
      externe, 
      destination, 
      id_typetrans, 
      codetype, 
      typetransport, 
      justified, 
      leaveid, 
      id_userabscent, 
      remarque2, 
      autretypeconge, 
      nbre_heure, 
      nbre_jour) 
VALUES  ('1', 
      '0', 
      CONVERT(DATE, '18/08/1436 00:00:00', 103), 
      CONVERT(DATE, '18/08/1436 00:00:00', 103), 
      CONVERT(DATE, '06/06/2015 05:00:00', 103), 
      CONVERT(DATE, '06/06/2015 09:00:00', 103), 
      N'', 
      NULL, 
      N'ddd', 
      '15', 
      '', 
      '', 
      '0', 
      'dd', 
      '0', 
      'CI', 
      '', 
      'True', 
      '0', 
      '0', 
      N'', 
      N'', 
      N'', 
      '0') 

SELECT Scope_identity() 

错误:

Msg 8152, Level 16, State 4, Line 1
String or binary data would be truncated.

+0

检查每个列的大小相对于您正在尝试插入值。 –

+1

thx dude :) codetype太短;) –

回答

0

变化'15'15,所以对所有的整数列

相关问题