Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: doing data conversions

Re: doing data conversions

From: Steve Long <steven.long_at_erols.com>
Date: Thu, 10 May 2001 08:57:42 -0400
Message-ID: <9de3dn$ojj$1@bob.news.rcn.net>

it depends on what you mean by "convert". there are several ways a conversion can be done.

  1. if you mean replace the use of two letter abbreviations by full names, just type the names out in a sql insert command "insert into states value ('Alabama'); insert into states ('etc');
  2. if you mean using the two letter code to look up the full name, i suggest having a table with two columns, the two letter in the first column and the full name in the second column. then use "select full_name from states where two_letter = &abbrev"
  3. a really ugly and inefficient way to do it is using DECODE....you can look this one up if you want to.

"jayzhee" <nospam_at_newsranger.com> wrote in message news:8_vK6.817$bi2.63683_at_www.newsranger.com...
> Hello all. I am looking for a little point in the right direction with
 data
> conversions.
>
> I have a column that has state abbreviations (GA). I need to convert them
 to
> the full name. Can regular SQL do this? Not sure if I somehow have to
 loop
> through the rows and use if/then/else logic.
>
> Tks
>
> jz
>
>
Received on Thu May 10 2001 - 07:57:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US