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 |
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2010-12-02 : 05:57:02
|
| I am trying to insert a line of data into a table from a temp table.code as followsinsert into nominess_list ([Status], Total)(select 'New Nominees £s', count(contact_ref) from Nominesshaving count(contact_ref) >0)and result is as followsMsg 8152, Level 16, State 14, Line 1String or binary data would be truncated.The statement has been terminated.this has got to be something small.MCTS / MCITP certified |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2010-12-02 : 06:03:31
|
| check the size of the columns in which you are inserting data.the size of the either columns is small then that of the data you are passing to it. |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-02 : 06:04:00
|
| What size is Status?'New Nominees £s' is 15 charactersI take it Total is a numeric datatype.no need for the bracketsinsert into nominess_list ([Status], Total)select 'New Nominees £s', count(contact_ref)from Nominesshaving count(contact_ref) >0)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
masterdineen
Aged Yak Warrior
550 Posts |
Posted - 2010-12-02 : 06:09:34
|
| O MY GODhow careless is that, thank you for answering such a stupid mistake. |
 |
|
|
|
|
|