March 22, 2006 at 10:19 am
I try to use for each loop reading several text files like dat1.txt,dat2.txt,dat3.txt... iand insert them into a sql server table and whenever there is an error in the input data I would like to log them and find out what is the line numer and the input file name that had the error. When I looked at the log file it shows the line number but is does not tell me the file name.
Would you you please help me in that.
Thanks
March 23, 2006 at 9:37 am
The only real way is to add the field name (which you will have stored in a variable from the ForEach loop) as a new column using the Derived Column transform.
Are you absolutely sure the line number is in there? There is no concept of line numbers in SSIS unless you explicitly add them in yourself.
-Jamie
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
March 24, 2006 at 11:10 am
Hi Jamie,
Would you please let me know how I can add the field name you mentiomd?
Thanks
Mark
March 24, 2006 at 2:50 pm
Open up the derived column transform. In the top left segment expand variables and drag the variable you want into the lower window. That'll create an extra column with the variable value in it.
-Jamie
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply