Sql="Select * From [table] Where Where SHU = " SR=trim(request("SR")) If Len(SR)>1 Then For i =1 To len(SR) Sql=Sql&mid(SR,i,1)&" or SHU = " Next Sql=Left(Sql,Len(Sql)-10) Else Sql=Sql&SR End IF