-
script to accept number range
Hi all,
I'm trying to write an sql script to accept a range of numbers. On a search page, I would request the user to enter a size range like 56...59, that is associated with another search field (but that's irrelevant in this question). I would parse this info as 'size'. How do I get sql to recognise this and search the database for numbers 56, 57, 58 and 59?
TABLE.COLUMN like ????
Thanks for any help.
Giovanni
-
script to accept number range (reply)
Declare @str varchar(255), @sql varchar(1000)
Set @str = '2,3,4,5,6,7,8'
Set @sql = 'Select * From tblItems Where ItemID In (' + @str + ''
Exec(@sql)
------------
Giovanni at 1/30/2002 5:41:52 PM
Hi all,
I'm trying to write an sql script to accept a range of numbers. On a search page, I would request the user to enter a size range like 56...59, that is associated with another search field (but that's irrelevant in this question). I would parse this info as 'size'. How do I get sql to recognise this and search the database for numbers 56, 57, 58 and 59?
TABLE.COLUMN like ????
Thanks for any help.
Giovanni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|