Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002

    Unanswered: populate numeric col with data from varchar

    I need to populate (UPDATE) a field called 'analy' with the numeric data from a varchar field called 'result'. The problem is there are alpha characters in some of the values. I need to weed those out and set only the numeric values into 'analy'. I keep getting the 'Error converting data type varchar to numeric.' error in query analyzer. I've tried a bunch of different things and have tried to minimize it to just an update statement setting analy=result where isnumeric(result) =1. Can anyone help me out?

    I'm using sql server 2000 if it matters.
    Thanks in advance!

  2. #2
    Join Date
    Feb 2002
    Is result part of the same table as analy ? What is the key field for this table ? Do you want to update analy with the field result from the same row ?

  3. #3
    Join Date
    May 2002
    Thanks for your reply.
    1. 'result' is in the same table as 'analy'.

    2. pKey is the primary key generated on creation/update of table (this table is created from a dtc pulling data from a view that lives on another server and administered by someone that sits very far away from me...don't know how they have databases without keys, but they do so I added my own).

    3.I do want to update analy with the field result from the same row.
    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts