March 18, 2010 at 10:45 am
Hi,
I am trying to update columns within a table when several conditions are true (see below).
UPDATE dbo.LSR_Prep
SET
Result = RTRIM(LTRIM(Crude_Result)),
Result_4 = '1'
WHERE
RTRIM(LTRIM(Analysis_Code)) = '58'
AND
ISNUMERIC(RTRIM(LTRIM(Crude_Result))) = 1
AND
RTRIM(LTRIM(Crude_Result)) > 3;
However, the following message is displayed:
Msg 245, Level 16, State 1, Line 2
Conversion failed when converting the nvarchar value '1.611226611' to data type int.
All the columns are data type nvarchar. The 'Crude_Result' column contains numeric and alphanumeric data.
Any ideas?
Thanks in advance,
Neal
March 18, 2010 at 12:06 pm
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply