From: MARC BEDOIS <mbedois@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: retrieving specific info. from one column and locating it in another
Date: Thu, 21 Nov 2002 06:11:57 -0800 (PST)
Message-ID: <20021121141157.69252.qmail@web40002.mail.yahoo.com> (raw)
I'm trying to retrieve some info from one column and
put it in another. I have a column that has a bunch
of information in it called 'Route'. I don't need to
show all of that information. Instead I need divide
that single column into two seperate columns called
'Sender' and 'Receiver'. How do I divide this
information up into these two columns. I know of
methods called charindex and patindex. I need to do
something like that but instead of returning the
position of the info, to just return the selected
info.
Ex) I have a column named Route....with info in it
similar to 'UPS NS Ground'
How do I create a second column called
'Delivery' and pull only the 'NS' out of the Route
column and put it into the 'Reciever' column?
Similarly how would I pull just the UPS part
out of Route and put it into 'Sender'?
thanks,
Marc
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mbedois@yahoo.com
Subject: Re: retrieving specific info. from one column and locating it in another
In-Reply-To: <20021121141157.69252.qmail@web40002.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox