The code column in the items table is smaller than the number of characters
in the codes in the code column of the item_tepe table.
Also, you don't want to join on text values. Your Code should be an integer,
preferably an identity field.
Robert.
[quoted text, click to view] "SubramanianRamesh" wrote:
> hi
> i have two tables
> items
> student code name
> 1 null book
> 2 null book
> 3 null pen
> .
> .
> going
> anothr table
> item_type
>
> name code
>
> book code1
> pen code2
>
> now i want to update table item colmn code is item_type code
>
> i used this query
>
> UPDATE items
> SET code = it.code
> FROM items i ,item_type it
> WHERE i.name = it.name
> this query return error
>
> String or binary data would be truncated.
> The statement has been terminated.
>
> thanks in advance