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 |
|
ansujoseph
Starting Member
1 Post |
Posted - 2005-06-20 : 07:11:16
|
| Hi,I have the following table in SQL Server.Sname-----RameshR_R_VinayI need to select all the rows with name as '_' (underscore).Please help me.ThanksAnsu |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-20 : 08:10:50
|
| Select * from yourTable where name like '_%'MadhivananFailing to plan is Planning to fail |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-06-20 : 08:16:15
|
| Since underscore is a wildcard character, you need to modify Madhivanan's query a little bit:Select * from yourTable where name like '[_]%' |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-20 : 08:20:11
|
Rob, Thanks. I did not notice that MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|