csv import into database

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
johnghng
Posts: 1
Joined: Thu Apr 28, 2011 6:17 am

csv import into database

Post by johnghng »

I have a batch of text files that need to be regularly importe into an sql database
the only strange thing is that there is a header which looks like :
10|2|6/1/2010 12:00:06 PM|PreExistingCond|PreExisting Condition Letter|||D

or

10|4|8/23/2010 1:28:02 PM|DETO|Dependent Over Age Limit|DETO|DETO|D

after that, it is a | deliminated file.
I need to do an import that will look for the field containing PreExisting Condition Letter or Dependent Over Age Limit and then use that to fill a field for every line imported from that text file.

Each text file has a header like that followed by rows of | deliminated address informatoin. That area determines the type of letter to be sent, so that needs to be repliccated to the last column called lettertype before the import. There is no column header information in the file, so columns are determined by their position.
Any help would be appreciated.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: csv import into database

Post by DataMystic Support »

With everything here inside a Filters\Restrict\Each line in turn;
Use a Filters\Restrict\Delimited fields (CSV, Tab, Pipe, etc) to capture the desired field to a Filters\Special\Capture text.
Then, use a Add right margin filter to add the captured data (with a preceding |) at the end of the line.
Post Reply