variable precison different in acces 2k

thebolly

New member
Local time
Today, 11:58
Joined
Apr 2, 2003
Messages
8
help! (again!!)

i've noticed that under access 2000/2002 select into queries are giving integer values where previously they were double precision, which is messing up my results in a major way

is there an easy work around or do I have to change to using a create table (specifiying the variable precision) and inserting the data into it!

the problem is in the query below

SELECT A.Start_Block_ID,
A.Number_Of_Readings,
SUM((A.Reading - B.Reading)^2) AS Numerator,
0.0 AS Denominator,
0.0 AS R_Value,
FALSE AS Pass
INTO temp_Homogeneity_Pass_Calculations_ian
FROM tbl_Homogeneity_Data AS A
INNER JOIN tbl_Homogeneity_Data AS B
ON A.Start_Block_ID = B.Start_Block_ID
AND A.ID = B.ID + 1
WHERE NOT A.Pass
GROUP BY A.Start_Block_ID, A.Number_Of_Readings;

what i need is to keep double precion for

select 0.0 as denominatior into table...

select 0.00000001 works but its a bodge!


thanks

ian
 
Last edited:
Use a function to force the data type:

SELECT A.Start_Block_ID,
A.Number_Of_Readings,
SUM((A.Reading - B.Reading)^2) AS Numerator,
CDbl(0.0) AS Denominator,
CDbl(0.0) AS R_Value,
FALSE AS Pass
INTO temp_Homogeneity_Pass_Calculations_ian
FROM tbl_Homogeneity_Data AS A
INNER JOIN tbl_Homogeneity_Data AS B
ON A.Start_Block_ID = B.Start_Block_ID
AND A.ID = B.ID + 1
WHERE NOT A.Pass
GROUP BY A.Start_Block_ID, A.Number_Of_Readings;
 
pat, again you have come to my rescue! thank you.

Could you reccommend a resource that would highlight any other issues that I may encounter between 97 and 2002

regards

Ian
 

Users who are viewing this thread

Back
Top Bottom