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


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

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

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!a8g2000pri.googlegroups.com!not-for-mail
From Johnnyb <john.lutheran@gmail.com>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Need help creating a view that can edit a string.
Date Thu, 10 Feb 2011 13:51:47 -0800 (PST)
Organization http://groups.google.com
Lines 31
Message-ID <a083ec0f-35e2-4977-8c13-87f4cb817f55@a8g2000pri.googlegroups.com> (permalink)
References <e59a5f05-3dbd-4c91-adc1-d7e10b0cb492@z3g2000prz.googlegroups.com> <ij1h3e$12l$1@news.eternal-september.org>
NNTP-Posting-Host 134.253.26.10
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1297374708 2301 127.0.0.1 (10 Feb 2011 21:51:48 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Thu, 10 Feb 2011 21:51:48 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info a8g2000pri.googlegroups.com; posting-host=134.253.26.10; posting-account=kYW--QoAAABRuO6dTOz2QITtLsB-PRVZ
User-Agent G2/1.0
X-HTTP-Via 1.1 sahp4060.sandia.gov:80 (squid/2.6.STABLE21)
X-HTTP-UserAgent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13,gzip(gfe)
Xref csiph.com comp.databases.ms-sqlserver:1581

Show key headers only | View raw


On Feb 10, 1:16 pm, "Bob Barrows" <reb01...@NOyahooSPAM.com> wrote:
> Johnnyb wrote:
> > I receive this data in a column in a table:
> > $8982162:2$905122:2$905PPA:
> > 25$9601217:2$962B19:2$CSRI96:2$WDCOLACK:2$IDRBLACK2:2$IDRRED:2$
>
> > I need to make a view that will keep only the entries in that string
> > that start with 'WDCO' and omit the rest
>
> > So I need to edit text in the process of copying the data from the
> > table to the view. Hope this makes sense, sorry, I'm a newb.
>
> > SQL 2008 with patches.
>
> Please show us exactly what you want to extract from that string in addition
> to attempting to describe/explain it. Based on your description, you want
> the query/view to return:
> WDCOLACK:2$IDRBLACK2:2$IDRRED:2$
>
> Is that your intent?
> Or do the $ symbols represent delimiters for "entries" in the string, in
> which case this is what you want to return:
> WDCOLACK:2

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'.

Thanks

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


Thread

Re: Need help creating a view that can edit a string. Johnnyb <john.lutheran@gmail.com> - 2011-02-10 13:51 -0800

csiph-web