Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    29

    Unanswered: Upper / Lower string manipulation

    In a string that contains:

    Smith, Peter D. b. January 10, 1943 d. March 5, 1997

    I am trying to find were the d. (lower case) starts, any suggestions?
    My queries always return the D. (upper case)

  2. #2
    Join Date
    Nov 2002
    Posts
    207
    This is what I get...

    > select charindex('d.',"Smith, Peter D. b. January 10, 1943 d. March 5, 1997");

    -----------
    37

    (1 row affected)
    > select charindex('D.',"Smith, Peter D. b. January 10, 1943 d. March 5, 1997");

    -----------
    14

    (1 row affected)

  3. #3
    Join Date
    Apr 2004
    Posts
    29
    Thanks, but I get 14 each time, for d. or D.

    How can that be, I must be missing something.

  4. #4
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    You probably have a case-insensitive character sort. If that's the case, I don't know how to force it to be case-sensitive for a given query.
    Thanks,

    Matt

Posting Permissions

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