SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MS Access & SQL query help...

    I have the need to run a case sensitive SELECT query and in that query return the results regardless if first letter is cap, or if it is mixed caps. I have no choice but to use MS Access.

    The db is a list of students with their own ID, real name, alias, etc. and the query is on the alias column.

    I've found numerous examples online, but none have worked so far. Any help will be GREATLY appreciated!

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,263
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    ... where ucase(alias) = ucase('fred')
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Almost there...

    Quote Originally Posted by r937 View Post
    ... where ucase(alias) = ucase('fred')
    Well, I don't get an error w/that query, but it doesn't quite do what I need. Lets say the alias "Umberhulk" already exists in the db. I do not want someone else to be able to use any variation of the same alias (ex umberhulk, umberHulk, UMBERhulk, etc).

    Thank you (anyone) VERY much in advance.

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Then don't worry about it--access is case insensitive by default.

    Though a better strategy is to require unique records for the field, absolutely ensuring that there are no duplicates.


Bookmarks

Posting Permissions

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