Question
Filtering RS using IN statement and cookie value
Scenario: Users of the site are to be presented with menu
items that are relative to their customer group which I'm pulling
from their customer details. User logs in, cookie is written to
identify customer and menu categories.
I'm trying to filter a recordset that I'm using to display categories for the menu using an IN statement with the values being pulled from a string in a cookie that looks something like (1,2,4,7,9,11) (& i've also tried it formatted like ('1','2','4','7','9','11').
My cookie is written like ("keyuser") ("defaultmenu") where "defaultmenu" contains the string I'm trying to use for the IN statement
My SQL looks like this:
SELECT *
FROM dbo.CatGroups
WHERE catid IN (MMColParam)
ORDER BY ParentGroup ASC
Runtime value = request.cookies("keyuser") ("defaultmenu") - The value I'm pulling in looks like this ('1','2','4','7','9','11')
Type = Text
My recordset brings back absolutey nothing!!
Has anyone done anything like this with using an IN statement or should I consider something else. Spent an afternoon playing but getting nowhere slow!!
Any help appreciated.
cheers
Julian Parkinson
I'm trying to filter a recordset that I'm using to display categories for the menu using an IN statement with the values being pulled from a string in a cookie that looks something like (1,2,4,7,9,11) (& i've also tried it formatted like ('1','2','4','7','9','11').
My cookie is written like ("keyuser") ("defaultmenu") where "defaultmenu" contains the string I'm trying to use for the IN statement
My SQL looks like this:
SELECT *
FROM dbo.CatGroups
WHERE catid IN (MMColParam)
ORDER BY ParentGroup ASC
Runtime value = request.cookies("keyuser") ("defaultmenu") - The value I'm pulling in looks like this ('1','2','4','7','9','11')
Type = Text
My recordset brings back absolutey nothing!!
Has anyone done anything like this with using an IN statement or should I consider something else. Spent an afternoon playing but getting nowhere slow!!
Any help appreciated.
cheers
Julian Parkinson
