Import a csv file and seperate bad data

  • Thread starter Thread starter cc4rhu
  • Start date Start date
C

cc4rhu

Guest
I want to import a csv file and store the good data (which matches input masks, validation etc) into one table, and all the bad data which is rejected into another table.

I've read a bit about an import error table, and although I do get errors when importing the csv file, no such table is generated.

Many thanks

Cc
 
Last edited:
Hi

Can you describe examples of good and bad data? Whilst it should be easy to identify data that doesn't meet validation criteria, it might be harder to identify data that doesn't conform to input masks (but I'm happy to be proved wrong on that).

My initial thought is to import the data into a temporary (or permanent) table, append (or flag) all data that meets the validation criteria and then go to work on the remaining data. You need decide what you are going to do for each exception - do you reject the entire line of data, take the bits that are ok, or transform the bad bits to some sort of default value? Or something else?

I think we will need a lot more information and examples before we can answer your question.

Andrew :)
 

Users who are viewing this thread

Back
Top Bottom