Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8CDF74758DC for ; Thu, 21 Nov 2002 09:11:54 -0500 (EST) Received: from web40002.mail.yahoo.com (web40002.mail.yahoo.com [66.218.78.20]) by postgresql.org (Postfix) with SMTP id 70382475AE5 for ; Thu, 21 Nov 2002 09:11:53 -0500 (EST) Message-ID: <20021121141157.69252.qmail@web40002.mail.yahoo.com> Received: from [167.121.8.18] by web40002.mail.yahoo.com via HTTP; Thu, 21 Nov 2002 06:11:57 PST Date: Thu, 21 Nov 2002 06:11:57 -0800 (PST) From: MARC BEDOIS Subject: retrieving specific info. from one column and locating it in another To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/373 X-Sequence-Number: 10515 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