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 |
|
ConradK
Posting Yak Master
140 Posts |
Posted - 2009-12-16 : 15:13:52
|
| when I put "not like '%--00%'" its seeing the -- as comment marker or soemthing, but I need to not include entries that have a '--00' in them.... what do? |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-12-16 : 15:25:19
|
Can you show us your whole query...this works fine for me..declare @t table(col1 varchar(20))insert @tselect '00--00' union allselect '100-0' union allselect '00-test--00'select * from @t where col1 not like '%--00%' |
 |
|
|
ConradK
Posting Yak Master
140 Posts |
Posted - 2009-12-16 : 15:41:32
|
| no, its because its a special character.I figured it out. I needed []s.not like '%[--]00%' is the solution. JUST figured it out. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-17 : 02:00:41
|
quote: Originally posted by ConradK when I put "not like '%--00%'" its seeing the -- as comment marker or soemthing, but I need to not include entries that have a '--00' in them.... what do?
It is because you are using the code in the front end?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|