G
Guest
I have an update query that needs to take decimal values (presented as text)
from a table (Tbl_3) and insert them into corresponding NUMERIC fields in
another table (Tbl_2), keeping the precision.
Here is what I have tried:
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = Val(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDbl(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDbl(Tbl_3.Technical_Score)*.01,
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDec(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
As an example, if I have a value of 3.7912345 in Tbl_3.Technical_Score, no
matter which of the commands above I use, I always get a resulting value in
Tbl_2.Final_Technical_Score of "4" with no decimals. It is rounded and the
precision is lost.
(In the 3rd example, I tried to force precision by multiplying the value by
..01, but what I really want in Tbl_2.Final_Technical_Score is exactly what I
started with (3.7912345).
What am I doing wrong?!?!?
from a table (Tbl_3) and insert them into corresponding NUMERIC fields in
another table (Tbl_2), keeping the precision.
Here is what I have tried:
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = Val(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDbl(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDbl(Tbl_3.Technical_Score)*.01,
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
UPDATE Tbl_3, Tbl_2
SET Tbl_2.Final_Technical_Score = CDec(Tbl_3.Technical_Score),
Tbl_2.Calculated_Result_Quadrant = Tbl_3.Calculated_Disposition
WHERE Tbl_2.ID=Tbl_3.ID;
As an example, if I have a value of 3.7912345 in Tbl_3.Technical_Score, no
matter which of the commands above I use, I always get a resulting value in
Tbl_2.Final_Technical_Score of "4" with no decimals. It is rounded and the
precision is lost.
(In the 3rd example, I tried to force precision by multiplying the value by
..01, but what I really want in Tbl_2.Final_Technical_Score is exactly what I
started with (3.7912345).
What am I doing wrong?!?!?