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 |
|
techrookie
Starting Member
6 Posts |
Posted - 2005-09-09 : 18:48:34
|
| I have the following simple query. However, I would like to omit all the records that contain a $ e.g. MGT-01-CORP$. How do I do this?SELECT USERNAMEFROM EVENTSWHERE USERNAME.....Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-09 : 18:50:09
|
| SELECT USERNAMEFROM EVENTSWHERE USERNAME NOT LIKE '%$%'You'll receive a performance penalty for this though.Have a look at LIKE in SQL Server Books Online for details on what it can do.Tara |
 |
|
|
nosepicker
Constraint Violating Yak Guru
366 Posts |
Posted - 2005-09-09 : 23:08:09
|
| Also keep in mind that this will exclude any usernames that are NULL. You will have to decide how you want to handle the NULL values, if any. |
 |
|
|
|
|
|