Hm. The problem I see with PatIndex is that it looks for a literal, not a list
item. I think this may solve the problem:
SELECT PATINDEX(',itemtofind,', ','&listfield&',')
This should append commas to the listfield so that looking for the itemtofind
delimited by commas will match properly. Not sure it'll work, but it's a good
start.
Thanks
>PATINDEX maybe?
>
>-----Original Message-----
>From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, May 15, 2007 1:02 PM
>To: SQL
>Subject: FIND_IN_SET for MSSQL
>
>Someone just asked me if there was an equivilent to FIND_IN_SET() in MSSQL.
>This function operates in the select portion of a query to return the
>numeric location of a list item that you want to check. It's just like
>listfind() in ColdFusion.
>
>Anyone know?
>
>Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2847
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6