From: jbarrett@s.psych.uiuc.edu (Jenny Barrett)
Newsgroups: comp.databases.oracle
Subject: reading data files into a newly created table
Date: 4 Apr 1994 15:58:13 GMT
Organization: UIUC Department of Psychology
Lines: 34
Message-ID: <2npdel$6hs@vixen.cso.uiuc.edu>
NNTP-Posting-Host: s.psych.uiuc.edu
Summary: Question re: how to load data into new table
Keywords: load data into table, sqlloader


Hi,
	I am trying to load data into a new table.  The data file will be 
unzipped so that the data will be in ascii in 10F9.3 format.  The file contains:

	An indeterminate number of lines of data, with EACH LINE of the file 
	consisting of 6 IDs followed by 440 data values.  These data values 
	represent values over time so I would need a column that would 
	increment for each data value.  Each data value would be a different
	row in the table. 

	Here is the complicated part:  for each row which would have a 
different data value in the column DATAVALUE (as I mentioned above)  I want to 
repeat the 6 IDs.  They wouldn't change until the newline is encountered.  
When the newline is reached, this would signal a new set of IDs, followed by 
another 440 data values.

	I would need to do the following:

	Do until end of data file:
	
		read a line
		get values for the 6 IDs and assign them to globals   
		
		for each row = current  to (current + 440) 
			1. assign those global values to the 6 IDs, 
			2. read the data and assign to the column DATAVALUE
			3. generate a value for the time marker column (starting
			from 0 to 440) each time a newline is encountered.

	Would I do the above by using Insert Triggers?  Is it even possible to
do the above?

Thanks,
Jenny Barrett

