Home Forums SQL Server 2005 Administering Msg 8152, Level 16, State 14, Line 1,String or binary data would be truncated. RE: Msg 8152, Level 16, State 14, Line 1,String or binary data would be truncated.

  • I missed mentioning that the query can also be written by excluding the FROM clause

    UPDATEdbo.tblCust

    SETLAST_NAME = SUBSTRING( FIRST_NAME, CHARINDEX( ' ', FIRST_NAME ) + 1, 100 ) + LAST_NAME,

    FIRST_NAME = SUBSTRING( FIRST_NAME, 1, CHARINDEX( ' ', FIRST_NAME + ' ' ) - 1 )

    WHEREFIRST_NAME LIKE '%-'

    Terry, Sometimes I hit the keyboard faster than usual when I spill my coffee over it:-D

    --Ramesh