Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

How to recognize single quotes in sql query where condition in sql server 2008 R2

$
0
0

Hi Team,

I want search results that includes Single quote as well irrespective of its position in the query. Example

If My search word is(input) "Sundaris" then I need to get list

(output)Sun'daris, Sundari's, Sundaris, S'undaris.....

Please help me to get this query.

Here is temptable created for your quick reference

 CREATE TABLE #TempTable(
 Name nvarchar(40))
 
 INSERT INTO #TempTable (Name)
VALUES 
('Sundari'),
('Sundari''s'),
('S''un''daris'),
('Su''ndaris'),
('Sundaris'),
('Sni''gda'),
('Sniga'),
('S''ni''gda')


Sundari


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>