Error in an insert statement

  • I am trying to insert a record into a table but keep getting this error...

    [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated. This is done from a stored proc.

    Here is the deal, when I created the table I set the field to varchar(10) allow null. Now I have changed the field to varchar(50) allow null. Now nothing longer than 10 characters can be inserted.

    What am I missing?

    TIA

    Jim

  • What's the definition of all the fields in the table you're inserting into? The error message could be related to a different field than the 1 you think.

    Amy

  • It is just the one field. Now I added a new field and set varchar to 50. I can see the new field in ent mgr but in query analyzer when select * from table the new field does not show in the results pane.

    Any thougnhts.

    TIA

    Jim

  • Can you post your table definition here? What you're describing doesn't make sense. If you add a field to a table, and select * from that table, it will automatically show the field name. (Unless you're selecting from a view, which needs to be refreshed to show the new column)

    Amy

  • As it turns out, I was modifing the wrong table. This is not an issue.

    Thanks for your responce and time.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply