decimal datatype field not sorting correctly

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi,


I'm using a passthrough query to pull in SQL Server data.
For some reason the decimal datatype field will not sort
correctly if the value is negative. See example below
where the column should be sorting in DESC order, which
means that the negative numbers should obviously be on the
bottom. Without having to run another query on top of
this, and then parsing the data to then change it do a
double (because a straight cdble will not work), any ideas
as to what the problem is? Is this just a glitch in
Access? Also, given the type of interface, I cannot
afford a performance hit on making a table or appending
the data, so that is out of the quertion.


Please let me know if you have any thoughts.


Thanks!

-0.01
-0.04
-0.08
-0.16
-0.16
-48.67
-126.71
-173.85
3805.80
980.91
789.92
 
Per my comments below:

1) Actually, if I do run a query on top of the
passthrough, the cdbl function does work... which allows
me to sort correctly on that field. I don't know why I
was thinking that it didn't work earlier.

2) HOWEVER, as I was writing about before, I would get
burned on the peformance on this. Besides, running a
query on top of the passthrough... just for sorting
purposes is pretty ridiculous anyway.

3) Any ideas about this problem? Why would this be
happening only with decimal datatype?


Thanks!
 
I ended up converting the value to Float using the CAST
function in my passthrough query.

So, I answered my own question. I thought I would throw
the answer out there... in case anyone is interested.

Rick
 
Back
Top