What is the result that you get when you have this query without the session variable filtering? So long as the recordset contains valid information you should be able to filter it like this without issue. You should try to remove the filtering to see if you get a valid result. Also, have you tried to execute this query on your db to ensure that it is properly crafted and not giving you any errors?