Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

Read more about CHARINDEX Here


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

Read more about CHARINDEX Here


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

Read more about CHARINDEX Here


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

added another function for finding columns with certain words
Source Link
Malachi
  • 29k
  • 11
  • 86
  • 188

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

Read more about CHARINDEX Here


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

Read more about CHARINDEX Here


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

added another function for finding columns with certain words
Source Link
Malachi
  • 29k
  • 11
  • 86
  • 188

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.

I have never used it before but I think what you are looking for is CHARINDEX I found a StackOverflow Answer that has several upvotes and no downvotes using it like this

WHERE CHARINDEX('</code></pre>', Body) = 0

So far from what I have seen they are relatively close to the same speed, and is giving the same results as your query.

I would much rather read this than Body not like '%</code></pre>%'

I think we have found a new "hammer", let's find some nails.


There is also a CONTAINS function in T-SQL, but unfortunately it cannot be used on that column of that table because the column is not Full-Text Indexed

Read more about CONTAINS Here

added 177 characters in body
Source Link
Malachi
  • 29k
  • 11
  • 86
  • 188
Loading
added 23 characters in body
Source Link
Malachi
  • 29k
  • 11
  • 86
  • 188
Loading
Source Link
Malachi
  • 29k
  • 11
  • 86
  • 188
Loading
lang-sql

AltStyle によって変換されたページ (->オリジナル) /