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

Help required for doing LIKE search in SQL

$
0
0

Hello All,

I have situation like below 

DECLARE @TempTable TABLE (Name1 VarCHar(100), Name2 VarChar(100))
INSERT INTO @TempTable(Name1, Name2)
VALUES('_HASKAR','BHASK_R')

SELECT * 
FROM @TempTable 
WHERE Name1 LIKE Name2

Both the columns are having WildCard (underscores). How can I do like search so that the where condition will be TRUE?

Regards,

Amar Ankatha


amar ankatha


Viewing all articles
Browse latest Browse all 8428

Trending Articles



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