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 |
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-16 : 10:08:32
|
| Hi guys,I have a data like this:Id fname1 aa.xyz2 aa.mno3 bb.xyz4 cc.xyz5 aa.tttI wan to list all data fname like '%xyz%' but i don't want to list aa.xyz% |
|
|
Bodestone
Starting Member
18 Posts |
Posted - 2009-02-16 : 10:13:12
|
| select id,fnamefrom mytablewhere fname like '%xyz'and fname not like 'aa.%' |
 |
|
|
rudba
Constraint Violating Yak Guru
415 Posts |
Posted - 2009-02-16 : 10:20:34
|
| Thanks Bodestone |
 |
|
|
|
|
|