select records that contain capital letters

  • how to find capital lettes in a field use query? thanks

  • Try something like this (the collation is key - you need to make sure the sure is case-sensitive:

    select *

    from mytable

    where patindex('%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%',mytable COLLATE Latin1_General_CS_AI)>0

    Now - this is going to cause scans, so will not be the fastest thing on the planet to run.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply