Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorting data saved as text in an access database

    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

  • #2
    New Coder
    Join Date
    Jun 2006
    Posts
    30
    Thanks
    2
    Thanked 1 Time in 1 Post
    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.

  • #3
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fatmumuhomer View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •