Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Having a blank Full-Text Search Parameter...possible?

$
0
0

Just started playing around in SSRS (it is ugly but it works) and I need help. But this is a SQL issue so it should be easy for someone not just playing DBA on TV. I have a table and I want to have users be able to search 4 fields (lets call them Last Name, First Name, Serial, Item).

The first 3 are easy, in my where clause I just did+ `%` and the user can leave those fields blank or fill them in and get all the info they need. The issue becomes when I introduce the Item field. The Item field is full-text indexed and I am using CONTAINS.... but I need to be able to have the user leave that blank if they don't know it.

Example: I want to see all the items Jon Snow has.... I can't...because you can't leave CONTAINS blank, nor can you wildcard a blank (I tried... "*" only works if you put in the first letter). ANNNDDDD I want to be able to...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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