Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to insert some data into other table but facing error..

SQL
insert into tbl_bank_mst
select CONVERT(varchar,'100'+ROW_NUMBER() over(order by t.a)) h,t.a,t.b,t.c,0,GETDATE(),null,'admin'  from
(
select distinct c_branch_name a,LEFT(c_branch_name,4) b,c_branch_name c from Tbl_Emp_Mst
where c_branch_name is not null and c_branch_name<>''
)t



error is like this ..pls tell me fast since it is very urgent

Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.
The statement has been terminated.
Posted

1 solution

Hello ,
This type of error comes when The field is NOT big enough to hold the data that you want to insert in table . First check the table structure and then insert .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900