csv import into database

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

csv import into database

Post by johnghng » Thu Apr 28, 2011 6:22 am

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


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: 2220
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: csv import into database

Post by DataMystic Support » Thu Apr 28, 2011 1:15 pm

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.

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest