Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
naresh0407
Starting Member
30 Posts |
Posted - 2012-06-16 : 01:07:42
|
Hi All,In Script task i am using C# to validate text file.I have 3 rows validating all the rows using C# in scriptask and wrting Logfile and if i get error i am sending mail.Can i use any other transformation to do this task.In Footer i have total no datarows count and at the sametime i have 3 datarows and this should match with datarows count..1st row is header...rows with no 2 is datarow and row with number 3 is footer.Now footer row count is 4 and no of details row is 3.Mismatch so i should send mail or write logfile without using scripttask.1 date2 xyz 040420122 abc 040320122 nnn 333333333 4 dateFileReader=New streamreader(LocalFileName)Newline=FileReader.readlineIf Left(NewLine,3)==1{Datevlue=XXX;} |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-06-16 : 09:11:15
|
i think you can make use conditional task to separate out detail,header etc and then use variables to store count of detail and compare with header count value------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|