Home > Archive > microsoft.public.sqlserver.server > November 2002 > Data Manipulation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Data Manipulation
Rinu Varghese

2002-11-07, 11:23 am

Hello,
When I run a query I'm getting the following result from one of my
columns " index=1,invoice=WBAGN63403DR09
33520021030151722". I would like
to get the value after index= and invoice=. So, for example, in the
above result, I would like to just get 1 and
WBAGN63403DR093352002103015172
2. The only option I can think of is
using substring.

Is there any other option that I can use? Can I search for a pattern,
in this instance, it will be "=". Please let me know if you think of
any other ways to get the data.

Thank You for your input.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Wayne Snyder

2002-11-07, 1:24 pm

You can use charindex, and substring... You could also write a user-defined
scalar function if this is something you think you will use a lot.

--
Wayne Snyder MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
(Please respond only to the newsgroups.)

I support the Professional Association for SQL Server
(www.sqlpass.org)
"Rinu Varghese" <rvarghese@track.com> wrote in message
news:ON184DohCHA.2232@tkmsftngp09...
> Hello,
> When I run a query I'm getting the following result from one of my
> columns " index=1,invoice=WBAGN63403DR09
33520021030151722". I would like
> to get the value after index= and invoice=. So, for example, in the
> above result, I would like to just get 1 and
> WBAGN63403DR093352002103015172
2. The only option I can think of is
> using substring.
>
> Is there any other option that I can use? Can I search for a pattern,
> in this instance, it will be "=". Please let me know if you think of
> any other ways to get the data.
>
> Thank You for your input.
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net