SQL Server Performance

Converting nvarchar to int

Discussion in 'ALL SQL SERVER QUESTIONS' started by Anthonyweb360, May 9, 2012.

  1. Anthonyweb360 New Member

    In SQL 2005 whenever i try to convert an nvarchar to int i received an error that it is not possible. The column with the value looks like this 00000010 and a snippet of the script use to convert looks like this. CAST(substring(UserID,5,3) As Integer)

    The table that holds the UserID store the value as a nvarchar. now we are trying to CAST the return substring value to int into another table with the column in new table has int.
  2. Luis Martin Moderator

  3. Anthonyweb360 New Member

Share This Page