Yes and No. First, I misunderstood, I thought that the list was being
passed, not already in the table.
The dbo.listToTable function is one that I created.
It returns a 2 column table with the following columns: Position, Value
So the corrected version (now that I'm learning to read) should be:
SELECT EmailAddr, RecipientID
FROM SupportEmailRecipient
WHERE '#Form.SubjectID#' in (SELECT VALUE
FROM dbo.listToTable(SubjectID))
Steve
-----Original Message-----
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 8:02 AM
To: CF-Talk
Subject: RE: SOT: Correct way to match a record with a list in one
field?
> SELECT EmailAddr, RecipientID
> FROM SupportEmailRecipient
> WHERE SubjectID IN (SELECT VALUES
> FROM
> dbo.listToTable('#FORM.SubjectID#'))
>
> If you want the functions, let me know.
Shouldn't that be
WHERE #form.SubjectID# IN (dbo.listToTable(SubjectID))
As there's one entry in form.SubjectID and SubjectID in the table is a
comma separated list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4