Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding a range in VB with SQL

Status
Not open for further replies.

ToeJamNEarl

Programmer
Jan 26, 2004
91
0
0
US
Hey guys,

I have in a VB application two text boxes that the user can enter a range that they would want to query off of the server. The user can have the option of inputing as much of the range information they know when creating their ranges.
I am wondering is there anyway I can use LIKE (for the wildcard search) in conjunction with BETWEEN?
If not, any ideas as how I can accomplish my goal of being able to create an sql search with a range that has sort of a wildcard functionality for the input range?

Thanks in advance,

-Diran
 
For wild card functionality I give them two options, 'Starts with' and 'Contains'. The first option has the wild card added after the user input and the second both before and after the input.

If you are trying to use BETWEEN with a date range have them select their dates from two date/time pickers (start/end, from/to). That way your dates are always complete.

zemp
 
Thanks Zemp, but I have figured out how I want to approach my problem and it was simpler than I had anticipated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top