Quantcast
Channel: Adding decimals to multiple values
Viewing all articles
Browse latest Browse all 6

Adding decimals to multiple values

$
0
0

Hi, I am attempting to add a decimal to all the values in my result set. I am using the function stuff() to add the decimal to the 3rd space and this works fine but it is only applied to the first value (150.43). I need to add this format to all my values.

Thanks

Script:

Update CHFHarvest
SetI10otherdx = stuff(substring(ResultText,1,300),4,0,'.')
FROM    TB_PatientServiceOrder inner join TB_Results on TB_PatientServiceOrder.Id = TB_Results.FullfillsPatientServiceOrder
inner join CHFHarvest on TB_PatientServiceOrder.AppointmentId = CHFHarvest.AppointmentId
where OrderNameText = 'HIM Secondary DXs' 

Old format:

I5043, R570, I2699, E871, F1520, N179, I82442, G9340, N390, I428, E119, J449, I480, K7031, G4730, K761, E875, R740, 

New format:

I50.43, R570, I2699, E871, F1520, N179, I82442, G9340, N390, I428, E119, J449, I480, K7031, G4730, K761, E875, R740, 


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images