Importing Text File into Existing Table 
Author Message
 Importing Text File into Existing Table

What it the proper way to import a delimited text file into an existing
Paradox table?  In the text file, say you only need 10 of the 20 fields.  I
need to be able to match the 10 fields in the text file up to 10 fields with
different names in the Paradox table.

I have been able to import the text file to a new table using
dlgImportASCIIvar, but how can I (using ObjectPAL) take only the fields I
need from that table and insert them into the Paradox table?  Does it matter
that the variable length table created from the text file has different
field names, types, and widths?

I am so close here.... help ..... please.

Thanks,
Jason Duke



Tue, 03 Sep 2002 03:00:00 GMT
 Importing Text File into Existing Table

1) Use appendASCIIVar . The method assumes that the first x fields from the txt
file match the first x fields in the destination table

2)

a) Use importASCIIVar to create a new table
b) Create an INSERT query to transfer data from the new table to the destination
table (Create the query interactively, save it to disk and paste it into the
Code Editor by selecting from the menu Edit, Paste From

HTH

Quote:

> What it the proper way to import a delimited text file into an existing
> Paradox table?  In the text file, say you only need 10 of the 20 fields.  I
> need to be able to match the 10 fields in the text file up to 10 fields with
> different names in the Paradox table.

> I have been able to import the text file to a new table using
> dlgImportASCIIvar, but how can I (using ObjectPAL) take only the fields I
> need from that table and insert them into the Paradox table?  Does it matter
> that the variable length table created from the text file has different
> field names, types, and widths?

> I am so close here.... help ..... please.

> Thanks,
> Jason Duke

--
Michael


Tue, 03 Sep 2002 03:00:00 GMT
 Importing Text File into Existing Table
If you run into any trouble using what appears to be the "standard" methods
I suggest you consider handling the text file as textstream and the table
with
a tcursor.

Now you can read the textfile one line at a time, parse the line (using
"breakapart"
or "Substr" methods), and finally build and insert or update the table
records as
you like. I found this process particularly valuable because I could not get
my
importAscii routines to adopt themselves to the various date (string)
formats
encountered. Now I convert the day, month and year parts to smallint and use
the date procedure with smallint arguments. That one is unambiguous!

hope this helps

regards Sven

Quote:

> What it the proper way to import a delimited text file into an existing
> Paradox table?  In the text file, say you only need 10 of the 20 fields.
I
> need to be able to match the 10 fields in the text file up to 10 fields
with
> different names in the Paradox table.

> I have been able to import the text file to a new table using
> dlgImportASCIIvar, but how can I (using ObjectPAL) take only the fields I
> need from that table and insert them into the Paradox table?  Does it
matter
> that the variable length table created from the text file has different
> field names, types, and widths?

> I am so close here.... help ..... please.

> Thanks,
> Jason Duke



Tue, 03 Sep 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. how to import text file (.txt) into existing Oracle table and automate the process

2. Import/append fields from excel/text files to an existing table

3. Dts Import Question:Importing Csv file in an existing SQL2000 table with row-level conditions

4. Importing/Merging Text File (csv) into existing DB (*.mdb)

5. Importing a Text File into an Existing Database

6. Importing "csv" file into existing table

7. Import 50 MB Text File to a table in sqlserver 7.0

8. Newbie : import text file into several tables

9. Import large Text file of 50 MB size to a table in sqlserver 7.0

10. Help importing text files into SQL tables

11. Import text file into 1 SQL table?

12. DTS launched from SP failing when importing from a text file to a SQL Server Table


 
Powered by phpBB® Forum Software