Skip to main content
Participant
June 6, 2015
Question

query of query not sorting properly

  • June 6, 2015
  • 1 reply
  • 401 views

I am using query of query to run against a product search using verity.  I have sort buttons that can sort the results by name or price, asc and desc.  When sorting by price, it is not sorting properly.  Here is an example:

$110.00

$110.00

$115.00

$124.00

$24.00

$36.00

$40.00

And so on.  What is going on?  Is there any way to fix this?  Thanks.

    This topic has been closed for replies.

    1 reply

    Dave Ferguson
    Participating Frequently
    June 7, 2015

    This is sorting properly.  It is sorting as a string.  To get it to sort numerically you need to convert it to a number.

    Participant
    June 7, 2015

    Thank you for the help.  I did not know this.  How would I go about converting it?  I have tried both a cast function from TSQL and a LSParseNumber(string) function from ColdFusion, but neither work.  I'm not sure what to do.

    Inspiring
    June 8, 2015

    Whats the database field type? What code have you tried already?