Hello. I have a large number of pairs of text files named in the following way:
2001FRMPM10.dat
2001FRMPM10.dad
where the .dat file contains colmnated data and the .dad file describes the data in the dat file. A typical .dad file might look like this:
Loc_code 5 CHAR ""
Date 8 CHAR ""
Param1 12 NUM -9
Param2 10 NUM -9
.
.
ParamN 10 NUM -9
where the first column is the field name, the second is the column width, third is data type, and last is the null value.
What I would like to do is create a DTS package that will read a dad/dat combo and put the data into a flat SQL table that "fits" the data.
eg.
create table 2001FRMPM10
Loc_code char(5) NOT NULL,
Date, datetime NOT NULL,
param1 float,
param2 float,
.
.
paramN float
GO
Now my question: What is the best way (or at least a good way) to get the values from the dad file into variables that I can then use to create the SQL table? I have done some reading and it appears I could take a number of routes, but I am very new to DTS (and SQL overall) and I thought it wise to ask the pros.
Thanks in advance,
Sean Raffuse
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!