Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
poornima
Starting Member
32 Posts |
Posted - 2006-11-11 : 02:02:41
|
| HelloI have a table consisting of Date,Particulars,Debit,Credit columns.I executed the following query to insert the values.insert into balancesheet(Particulars,Credit) VALUES('Salary',4917.00)Iam getting an errorString or binary data would be truncated.The statement has been terminated.Plz help me outThanks in advancePoornima |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-11-11 : 02:27:52
|
quote: String or binary data would be truncated
You get this Error, when you are trying to insert the values in the column which is greater then the field size defined into the table. what is the field size of the column Particulars? Are there any trigger on the table, through which you inserting the records in the some other secondary table? Chiraghttp://chirikworld.blogspot.com/ |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-11-11 : 03:33:00
|
| Can't really help unless you provide the DDL for the table balancesheet please.In particular what is the datatype of Particulars and Credit?Most probably one of those two columns is too "narrow" for the data you are trying to store. But it could be a host of other things which the DDL would reveal.Kristen |
 |
|
|
poornima
Starting Member
32 Posts |
Posted - 2006-11-11 : 05:35:12
|
| thank you.I got the problem solved.I did not mention the size of varchar ,the datatype of Particulars |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-12 : 20:12:52
|
quote: Originally posted by poornima thank you.I got the problem solved.I did not mention the size of varchar ,the datatype of Particulars
If you dont specify the column size, it is considered as 1. You should always define the sizeDeclare @s varcharSet @s='Test'Select @sMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|