A quick solution - if your querystring value is numeric - is to use Cint()
- which changes the querystring into an integer - eg
val = cint(request.querystring("number1"))
sql = "select * from table where table.number = " & val
If someone tries a sql injection by using a non numeric querystring value it will throw a type mismatch error and the database query will not be executed.
If you want to use something more complex than an integer then you should look at parameterised queries - there are plenty of questions on SO which deal with this, eg this one
Parameterized query in Classic Asp