Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

insert records from excel by conditions

$
0
0

hello all
I have packages that insert excel files into a table by using for loop container (the first step is truncate MRR table and then inserted into MRR table)

one of the fields in the excel is "birthdate"

I was asked to check before inserting the data if the age in the excel file is less then 1 year then insert to MRR table else
insert to a Logfile and write in a field the name of the excel file

my question:
1. how do I create condition before insert data to my db (MRR table) 
2. how do I get the name of excel file and write it to the Logfile (different file in each iteration)

limitation:

**can't calculate age in the excel ***
** the logic continue after MRR table is populated***

**need to be generic so I could use it all packages***

any advice will be appreciate 


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>