Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to do search on special characters in MS SQL?

Posted on 2008-10-07
2
Medium Priority
?
516 Views
Last Modified: 2010-04-21
Hi, Experts,
How I can make following SELECT statement return result set:
(I'm trying to find some special characters like a carriage return(CHAR(13)) in my text field)

SELECT Comment
FROM Forum
WHERE Contains(Comment, CHAR(13))

It seems Full-Text index totally ignores them. Is it possible to make them researchable? and how?

Thanks,
-Rick
0
Comment
Question by:RHADMIN
2 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 1000 total points
ID: 22664577
SELECT Comment
FROM Forum
WHERE charindex(CHAR(13), Comment) > 0
0
 
LVL 1

Author Closing Comment

by:RHADMIN
ID: 31504046
This is QUICK and get to the POINT! Thanks:)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question