#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171

    String (varchar) Range Search


    Hi;

    What's the proper way to search for SSN between 111-11-1111 and 555-55-4444. Coulmn is varchar.

    Thanks
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,207
    Rep Power
    4279
    Originally Posted by zxcvbnm
    What's the proper way to search for SSN between 111-11-1111 and 555-55-4444.
    Code:
    WHERE ssn BETWEEN '111-11-1111' AND '555-55-4444'
    i'm surprised you did not test this

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo