...

View Full Version : sorting data saved as text in an access database



zindaba
05-23-2008, 11:11 AM
Hi, i have a problem with sorting data in a database.
here's an example

i have data saved as alphanumeric in a field type text f110a/12,f110a/2,f110a/1,f110a/3,f110a/13

when i sort it comes out
f110a/1
f110a/12
f110a/13
f110a/2
f110a/3

how do i sort it so it'll look like
f110a/1
f110a/2
f110a/3
f110a/12
f110a/13

Fatmumuhomer
05-23-2008, 02:43 PM
This is just a quick idea that I haven't totally thought through. :)

Since that is text and contains alpha characters, it's going to sort alphanumerically. You could have extra columns that contain the values before and after the / and have the 2nd one stored as an int or something and do a 2nd sort based on that. Like I said, this is just a quick thought...can't garauntee it'd even work, but it's worth a try maybe.

zindaba
05-27-2008, 09:39 AM
This is just a quick idea that I haven't totally thought through. :)

Since that is text and contains alpha characters, it's going to sort alphanumerically. You could have extra columns that contain the values before and after the / and have the 2nd one stored as an int or something and do a 2nd sort based on that. Like I said, this is just a quick thought...can't garauntee it'd even work, but it's worth a try maybe.

thanx for the effort i will try it out



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum