Home Forums SQL Server 2005 T-SQL (SS2K5) Avoid a record that has first character as number in a column RE: Avoid a record that has first character as number in a column

  • I'd turn this:

    where firstname LIKE '[!-/:-ÿ]%'

    into:

    where firstname LIKE '[^0-9]%'

    The carat (up-arrow) means "excluding" in there. It's more clear that the exact thing you want to do is exclude 0-9, rather than an inclusive list of everything else.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon