Results 1 to 4 of 4

Thread: Beginning with a #

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Canada
    Posts
    75

    Beginning with a #

    I want to have a number of links where you click on the letter and get all the records starting with that letter...no problem, but how do i get all the records that start with a number?
    any help would be great

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Maybe I'm not following here, but, the substr function to get the first character and then compare to the link text?

    Maybe if you could explain a little more about the problem. I think I understand the scenario well enough.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Canada
    Posts
    75
    oh sorry....

    basically it's a big list of bands, but some of them start with a number.

    How would i do a SELECT * FROM TABLENAME WHERE the first character isnumeric?

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    for the letter ones, use something like
    Code:
    SELECT * FROM table WHERE SUBSTRING(fieldname, 1, 1) = 'A'
    for numbers, I think this will do
    Code:
    SELECT * FROM table WHERE SUBSTRING(fieldname, 1, 1) BETWEEN 0 AND 9

Posting Permissions

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



Click Here to Expand Forum to Full Width