Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query results different between CE and Standard editions.

Status
Not open for further replies.

Peager

Programmer
May 27, 2003
140
US
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.

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
 
Strange, though I don't understand this query. I suggest to post a bug on Connect if you're sure this is the result you're getting and you verified your data in both cases.

You can also try asking this question here


you'll have a better chance of getting expert's advice.

PluralSight Learning Library
 
Thanks Markos... I wasn't aware of the CE forum.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top