Has anyone observed different results when running the same query on CE and Std editions? The following code is a cluge to get around not having a 'TOP' clause in CE. It returns a different value depending on the engine it's run against.
The ANSI pole data looks like this...
Species Length class Butt_Circ
DF 55 4 38.0
DF 55 3 40.5
DF 55 2 43.5
DF 55 1 46.5
DF 55 H1 49.5
DF 55 H2 52.0
DF 55 H3 55.0
DF 55 H4 58.0
DF 55 H5 60.5
DF 55 H6 63.5
In CE the code returns a '3' while in Std Edition I get the correct value, '2'.
Any thoughts, a different way of approaching the problem, etc would be most helpful.
Thanks in advance,
paul
Code:
SELECT CASE
WHEN MAX(Class) LIKE 'H%'
THEN MAX(CLASS)
ELSE MIN(CLASS)
END AS CLASS
FROM ANSIPole
WHERE (Species = 'DF' AND
Length = 55 AND
Butt_Circ <= (44.5 - 1) )
The ANSI pole data looks like this...
Species Length class Butt_Circ
DF 55 4 38.0
DF 55 3 40.5
DF 55 2 43.5
DF 55 1 46.5
DF 55 H1 49.5
DF 55 H2 52.0
DF 55 H3 55.0
DF 55 H4 58.0
DF 55 H5 60.5
DF 55 H6 63.5
In CE the code returns a '3' while in Std Edition I get the correct value, '2'.
Any thoughts, a different way of approaching the problem, etc would be most helpful.
Thanks in advance,
paul