At 01:06 PM 7/22/2004 -0400, Joel Solomon wrote:
I am trying to import a .csv file into a table. The table has an index that
looks for a unique value. The .csv file has duplicates in it and I want
them to filter out when I import them. I cannot find an option in Gateway
that allows the records to be ignored at the time of executing, therefore
each time it finds a duplicate the import aborts. Does anyone have any
ideas?
Joel,
Assuming the target table name is MyTable. Then, try the following
simple technique:
01. PROJECT TEMP tMyTable FROM MyTable USING ALL WHERE COUNT = 0
02. Use your favorite routine of IMPORTing CSV data into tMyTable
03. DELETE DUPLICATES FROM tMyTable
or
DELETE DUPLICATES FROM tMyTable USING colname
04. APPEND tMyTable TO MyTable
05. DROP tMyTable
Have fun!
Very Best R:egards,
Razzak.