I meant SELECT PATINDEX(',itemtofind,', ','+listfield+',')
Plus, not comma.

> 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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2848
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to