سؤال

I have one table that has Image Data type column, that column contains Pdf and txt file.

My question is how to search any word with "LIKE" in Sql Exemple

Select * from tablename where ImageColumn LIKE @searchingword
هل كانت مفيدة؟

المحلول

You can try this, not sure how it will react to PDF file though...

select *
from dbo.tablename
where convert(varchar(max),convert(varbinary(max), ImageColumn)) LIKE @searchingword

نصائح أخرى

select
from dbo.tablename
where convert(varchar(max),convert(varbinary(max), ImageColumn)) LIKE '%' + 
CHAR(0x00)+ CHAR(0x01)+ CHAR(0x02) +'%'**
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top