FlowHeater - The Data Import / Export Specialist
Welcome, Guest
Username: Password: Remember me
See also the general examples available, which may answer your question: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values
  • Page:
  • 1


import if csv to sql 11 years 1 month ago #2108

  • john guillot
  • john guillot's Avatar Topic Author
  • Offline
  • Posts: 1
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.

Please Log in or Create an account to join the conversation.

Re:import if csv to sql 11 years 1 month ago #2109

It's possible but a bit tricky :)

I've made a little example; please have a look to the attachment import_header.zip.

The following steps are necessary
  1. Create a new Definition and configure the READ TextFile Adapter without the option "The first row containing column headings"
  2. Then we need two .NET Script Heater and one Filter Heater to Filter the first line = the header line.
  3. The script in the first .NET Script Heater stores the certain header information for each other lines.
  4. The second script just handles to filter the first header row.
  5. The Filter Heater filters the header line.

Attachment import_header.zip not found

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.122 seconds

other Languages


FlowHeater Home

de en


Privacy Statement

Copyright © 2009-2022 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook


 de en