Skip to content U.S. Department of Transportation/Federal Highway AdministrationU.S. Department of Transportation/Federal Highway Administration
Office of Planning, Environment, & Realty (HEP)

Standard Decennial Census 2000 Products

Converting Summary File 1 (SF1) Data into an Oracle Platform

Converting Summary File 1 (SF1) Data into an Oracle platform

Note: This note was posted as e-mail to the CTPP listserve. These notes are posted for guidance and help. If you have questions on SF1 or other Census 2000 products, please contact your State Data Center.

Here is a procedure used by Darryl Scott, South Western Regional Planning Agency to convert SF1 data into an Oracle platform.

INCOMING E-mail from Darryl Scott,

Here is my experience with importing the data into Oracle.

My goal was to load all the data for the State of Connecticut, all Counties in Connecticut, all Towns in Connecticut, and all tracts, block groups, and blocks in Fairfield County from Census 2000 Summary File 1 into Oracle and link it to GIS. Below are the steps I took to accomplish that task. I do not describe the failed attempts in detail.

  1. I downloaded the data in ASCII format for Connecticut from the Census Web Site and extracted all the files.
  2. I imported the ctgeo file into Oracle.
  3. Then I created a view that contained all the records that I wanted to
    import into Oracle.

Create view ctfcgeo as

SELECT sumlev, geocomp, logrecno, state, county, cousub, cousubcc, place,
placecc, placedc, tract, blkgrp, block, msacmsa, cmsa, macci,
pmsa, necma, necmacci, ua, uatype, ur, sldu, sldl, vtd, vtdi, zcta3, zcta5,
arealand, areawatr, arealand/2590000 as area_sqmi, name,
funcstat, gcuni, pop100, hu100, sdelm, sdsec, sduni, taz, macc, uacp, stfid
FROM ctgeo
WHERE (sumlev = '040' and geocomp='00') or (sumlev='050') or
(sumlev = '060' and Name Like '% town') or (sumlev = '140' and county =
'001') or (sumlev = '150' and county = '001') or (sumlev = '101' and county = '001');

  1. I tried to import one data file and delete the unneeded records with a SQL command, but the process proved to be very inefficient. So I wrote an Avenue Script that extracts the desirable records from sf1 data files. I saved the list of good values from the logrecno field to a text file. The script created one .dat file for each each .uf1 file. In addition, the script removed the first four fields from the uf1 file. The script caused ArcView and even the computer to hang, but that was how I knew the script was working.







rec_list_string = {}
rec_list_number = {}

for each rec in rec_list_string

for each file_prefix in file_list


for each i in 0..(data_file.GetSize-1)
if (dline=nil) then continue end


if (results= -1) then continue end



end"Finished Processing Files","Script")


  1. The following day, I created the SQL statements to create the tables in
    Oracle and control files to import the information in the dat files. (These files were compressed into a zip file and attached to this document.) I decided to use the same field names as described in the data dictionary. I sought help from Nanda Srinivasan at FHWA who told me about the sf1combo.xls file found at

    That file saved hours of work because I was able to create most of my SQL and control files from it. I still had to explore the data files to see which fields had decimal places, but fortunately most of the data did not have decimal places. I also added the number of the datafile to the logrecno field name to make sure that each table had unique fields (e.g. logreno1 for ct00001, logrecno2 for ct00002, and so on.) I also used TextPad
    ( to create the SQL and control files because of its ability to select text as blocks rather than lines. The SQL and control files worked and I was able to import the data from SF1 into Oracle.

  2. Then I had to link the data to TIGER 2000 files in shape file format. I already had the shape files from I created some views in Oracle where I joined the data files to the geography file and used the [logreno] field as the common field. Then, I used ArcView's Database Access Extension to add the Oracle views to a ArcView project. Except for the town level, I discovered that I needed to create a common field to link the Oracle views to the shape files. Thus, I created a
    stfid field in the ctgeo table with the SQL statements below.


alter table ctgeo add
stfid VARCHAR2(16);

update ctgeo
set stfid = state||county||tract
where sumlev='140';

update ctgeo
set stfid = state||county||tract||blkgrp
where sumlev='150';

update ctgeo
set stfid = state||county||tract||block
where sumlev='101';


  1. To improve performance, I created indexes on the logrecno* field on each sf1 table. I also indexed the sumlev field and stfid field in the ctgeo field.

It took a little bit longer than expected, but I accomplished my goals. I imported the sf1 data into Oracle and became able to produce thematic maps in ArcView. Because of this approach, the sf1 data can be used in ArcView, Microsoft Access, and any other software that can connect to the Oracle database through an ODBC connection.

Some of the codes I used are documented in the file

Updated: 10/20/2015
HEP Home Planning Environment Real Estate
Federal Highway Administration | 1200 New Jersey Avenue, SE | Washington, DC 20590 | 202-366-4000