I have a View
that I like to search a word in it.
How can I search a word in all column of table?
SELECT *
FROM [Vw_FullTechInformation]
I have a View
that I like to search a word in it.
How can I search a word in all column of table?
SELECT *
FROM [Vw_FullTechInformation]
You can do full-text search on all columns like this
-- using contains
SELECT *
FROM [Vw_FullTechInformation]
WHERE CONTAINS(*, 'YourSearchText');
--using freetext
SELECT *
FROM [Vw_FullTechInformation]
WHERE FREETEXT(*, 'YourSearchText');
--using freetexttable
SELECT *
FROM FREETEXTTABLE([Vw_FullTechInformation],*,'YourSearchText')
But your table/view should be full-text indexed for this to work.
Try,
firsttable Record Like this
ID Value
1 First
2 Second
3 Third
4 FOUR
5 FIVE
6 six
SELECT * FROM firsttable
WHERE Value LIKE '%s'
OR Value LIKE 's%'
OR Value LIKE '%s'
OR Value LIKE '%s%' ;
**Output Like**
ID Value
1 First
2 Second
6 six