Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
eevans
Starting Member
48 Posts |
Posted - 2009-04-02 : 13:16:42
|
Hello,I would like to pull rows where a paricular column starts with a number. Is there a quicker way of doing that than this...column_a LIKE '0%' OR column_a LIKE '1%' OR column_a LIKE '2%' OR etc.Thanks. |
|
revdnrdy
Posting Yak Master
220 Posts |
Posted - 2009-04-02 : 13:27:38
|
quote: Originally posted by eevans Hello,I would like to pull rows where a paricular column starts with a number. Is there a quicker way of doing that than this...column_a LIKE '0%' OR column_a LIKE '1%' OR column_a LIKE '2%' OR etc.Thanks.
try thisSELECT * FROM SomeTableWhere column_a LIKE '[0-9]%' r&r |
|
|
eevans
Starting Member
48 Posts |
Posted - 2009-04-02 : 13:57:39
|
Thanks! |
|
|
|
|
|