Update one field (int) from another with cast on a varchar

  • i need to update a new field called 'NBC_ID_Numeric' based on a varchar value in an old field called 'NBCID'

    I tried to use this but my syntax was wrong, ideas?:

    update [NBC_TNG].[dbo].[ExamData] SET [NBC_ID_Numeric] SELECT CAST([NBCID] AS int)

  • SET [field] = CAST....

  • that worked... thanks!!

Viewing 3 posts - 1 through 2 (of 2 total)

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