Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1577

Re: Need help creating a view that can edit a string.

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 <esquel@sommarskog.se>
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 <Xns9E8A7AACDD1Yazorman@127.0.0.1> (permalink)
References <e59a5f05-3dbd-4c91-adc1-d7e10b0cb492@z3g2000prz.googlegroups.com> <ij1h3e$12l$1@news.eternal-september.org> <a083ec0f-35e2-4977-8c13-87f4cb817f55@a8g2000pri.googlegroups.com>
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

Show key headers only | View raw


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

Back to comp.databases.ms-sqlserver | Previous | Next | Find similar


Thread

Re: Need help creating a view that can edit a string. Erland Sommarskog <esquel@sommarskog.se> - 2011-02-12 00:02 +0100

csiph-web