Normal Topic [SOLVED] Sorting records (Read 590 times)
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
[SOLVED] Sorting records
Sep 5th, 2007 at 9:08am
Print Post Print Post  
I had the fields as txt not number, thanks bob


I have a LE that has nothing in it but numbers, I tried doing a default sort and it worked but didn't show the numbers in order.

IE

1104
1103
400

etc

I want them to be in order.

Thanks
Drastixnz
« Last Edit: Sep 6th, 2007 at 12:56am by drastixnz »  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Sorting records
Reply #1 - Sep 5th, 2007 at 1:14pm
Print Post Print Post  
Hello Drastixnz,

Is the number field the first field in the sort spec?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Sorting records
Reply #2 - Sep 5th, 2007 at 2:17pm
Print Post Print Post  
You have nothing but numbers in the field, but is it really bound to a number field type or is it actually a text field type?

Text field types will sort differently, per ASCII codes, but number field types will sort numerically.

To keep numbers sorting properly in text type fields, you need to front load them with zeros.  You cannot use front loaded zeros in a number type field.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sorting records
Reply #3 - Sep 5th, 2007 at 4:16pm
Print Post Print Post  
drastixnz wrote on Sep 5th, 2007 at 9:08am:
I have a LE that has nothing in it but numbers, I tried doing a default sort and it worked but didn't show the numbers in order.

IE

1104
1103
400

etc

I want them to be in order.

Thanks
Drastixnz


Hmmmm,

1104 > 1103 > 400

They look like they are in reverse order. Do you have an ascending or descending sort?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Re: Sorting records
Reply #4 - Sep 5th, 2007 at 8:13pm
Print Post Print Post  
Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed Embarrassed


Such a newbie mistake

errr ummm  Embarrassed Embarrassed Embarrassed the reason why the sort was as bob pointed out i had a text field not a number filed, I have now since updated all field so they are the right type

Once again, i am great full thanks. to all

drastixnz
  
Back to top
IP Logged