Highlighted

query of query not sorting properly

New Here ,
Jun 06, 2015

Copy link to clipboard

Copied

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.

Views

179

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

query of query not sorting properly

New Here ,
Jun 06, 2015

Copy link to clipboard

Copied

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.

Views

180

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 06, 2015 0
Engaged ,
Jun 06, 2015

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 06, 2015 0
New Here ,
Jun 07, 2015

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 07, 2015 0
haxtbh LATEST
Advocate ,
Jun 08, 2015

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 08, 2015 0