I have this inventory database used to track where items are. The query below doesn't seem to work how I expect it. I would like to be able to input something like "Dell" and it should come up with everything in the description box with the words "Dell" in it (not case sensitive). But, it only comes up when using exact matches (inputting "Dell Monitor"). I thought using "like '%:Value%'" would do it but that don't work. neither does " = :Value" (Value is my dynamic variable). I thought that by default, searches are done as wildcards. I can't seem to find any documentation on the syntax either.
select a.asset_tag AS 'Asset Number',
a.asset_description AS 'Asset',
i.item_number AS 'Item Description',
a.model AS 'Model Number',
a.serial_number AS 'Serial Number',
l.code AS 'Location',
c.description AS 'Category',
d.contract_id AS 'Contract ID'
from asset a, location l, item i, category c, contracts d
where (a.asset_description = :Value or
i.item_number = :Value or
l.code = :Value or
a.model = :Value or
a.serial_number = :Value or
a.asset_tag = :Value or
c.description = :Value) and
a.location_id = l.location_id and
a.item_id = i.item_id and
c.category_id = i.category_id and
a.record_status = '1'
order by l.code