Svein Erling Tysvær skriver: > > > POSITION(sep || soughtval || sep in sep || searchedvaluelist || sep) > 0 > > > > Adding sep before and after each string makes sure you don't get > false hits, like '12' > > in '341256,234,567' where '12' appears inside '341256', but ',12,' > doesn't. > > Good idea, Kjell, but then why not use CONTAINING as an alternative to > POSITION? > > sep || searchedvaluelist || sep CONTAINING sep || soughtval || sep >
Yes, obviously. I forgot about that one. :-) Anyway, I've used this technique many many times in regular Delphi code. Not so often in C#, probably because it has string.split() etc. Kjell -- ------------------------------ Kjell Rilbe DataDIA AB E-post: [email protected] Telefon: 08-761 06 55 Mobil: 0733-44 24 64 [Non-text portions of this message have been removed] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
