Forums
This topic is locked
Filtering RS using IN statement
Posted 15 Oct 2007 20:32:37
1
has voted
15 Oct 2007 20:32:37 Julian Parkinson posted:
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"
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!! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Any help appreciated.
cheers
Julian Parkinson