Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: Need help creating a view that can edit a string. Date: Sat, 12 Feb 2011 00:02:49 +0100 Organization: Erland Sommarskog Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx01.eternal-september.org; posting-host="L7AjRjCtBsuTlmPDWTM+Pw"; logging-data="19986"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Lh9CPcX25/EibZV/AbG4T" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:7AcC4mne6TwOmVeuCq0ZPjEZnfM= Xref: csiph.com comp.databases.ms-sqlserver:1577 Johnnyb (john.lutheran@gmail.com) writes: > Sorry, it is the second answer. I get random entries - like > $8982162:2$905122:2$905PPA:25$9601217:2$962B19:2$CSRI96:2$WDCOLACK: > 2$IDRBLACK2:2$IDRRED:2$. The $'s are delimiters, and I only want to > capture the entires that start with 'WDCO'. Use a list-to-table function to convert the entries to table, then you can use a plain LIKE to find the rows that interest you. You find several such functions on http://www.sommarskog.se/arrays-in-sql-2005.html -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx