changing a range into discrete values for a field in oracle I have a data table that contains records like this:

ZIP       Ground  Air
010-041   005     305
150-163   004     304


As I have it right now, it's actually an excel file but I eventually need to convert it into a table in Oracle.  The problem is that the format of the first column is a range but I need it as discrete values i.e. 

ZIP

10    005     305
11    005     305
12    005     305
13    005     305
14....


What's the easiest way to accomplish this in excel and/or oracle?
Assuming you have inserted the data into Oracle perhaps using an external table, you could use the connect by clause of a hierarchical query to generate the additional rows you need.  

Setup to simulate the source data:

DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1 (Zip Varchar2(7), Ground Varchar2(3), Air Varchar2(3));
INSERT INTO t1 VALUES ('010-041','005','305');
INSERT INTO t1 VALUES ('150-163','004','304');


Solution:

CREATE TABLE t2 AS (
  SELECT substr(zip,1,3) + Level - 1 Zip, Ground, Air 
  FROM t1 a CONNECT BY level &lt;= substr(zip,5,3)-substr(zip,1,3)
  );




If you'd rather do more work on the Excel side, then you could create the following table in Oracle:

CREATE TABLE t1 (Zip Number(3), Ground Varchar2(3), Air Varchar2(3));


Then run a formula like this for each row in Excel:

=CONCATENATE("INSERT INTO t1 (SELECT ",MID(A2,1,3),
    "+Level-1,'",B2,"','",C2,"' FROM dual connect by level &lt;=",MID(A2,5,3)-MID(A2,1,3),");")


This will produce insert statements that you can then run in Oracle.  They will look like this:

INSERT INTO t1 (SELECT 010+Level-1,'005','305' FROM dual connect by level &lt;=31);