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 |
|
PGG123
Yak Posting Veteran
55 Posts |
Posted - 2004-05-18 : 13:13:38
|
| Here's my resultset, but I want to just get two userIDs: one with the "!" and one from the rest. How should I do this?txtUserID txtPassword dteExpiryDate V3IH1R password 2004-11-18 08:29:05.000U2X557 password 2004-11-18 08:29:05.000S6Y224 password 2004-11-18 08:29:05.000RS2ZC4 password 2004-11-18 08:29:05.000Q0E4L7 password 2004-11-18 08:29:05.000LS7LQ0 password 2004-11-18 08:29:05.000LMN45S password 2004-11-18 08:29:05.000D81KAJ password 2004-11-18 08:29:05.000577USI password 2004-11-18 08:29:05.00050A914 password 2004-11-18 08:29:05.0004SGFX8 password 2004-11-18 08:29:05.0001J6B0Q password 2004-11-18 08:29:05.0000P2ASP password 2004-11-18 08:29:05.000!GB68J password 2004-11-18 08:29:05.000 2004-11-18 08:29:05.000 2004-11-18 08:29:05.000 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-05-18 : 13:29:31
|
| SELECT TOP 1 txtUserIDFROM Table1WHERE txtUserID LIKE '%!%'UNION ALLSELECT TOP 1 txtUserIDFROM Table1WHERE txtUserID NOT LIKE '%!%'Tara |
 |
|
|
|
|
|