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.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 SSIS Package

Author  Topic 

srisql
Starting Member

3 Posts

Posted - 2011-09-30 : 13:05:10
Hello,

I am new to SSIS.But I am really interested in learning SSIS.I learnt some of the topics and started creating packages in SSIS.I came across this scenario in google.

"A scenario: Want to insert a text file into database table, but during the upload want to change a column called as months - January, Feb, etc to a code, - 1,2,3.. .This code can be read from another database table called months. After the conversion of the data , upload the file. If there are any errors, write to error table. Then for all errors, read errors from database, create a file, and mail it to the supervisor.
How would you accomplish this task in SSIS?"

Till uploading the file I got an idea.But how to deal with creating an error table and sending an email to supervisor?...I would really appreciate if anyone explain me the steps involved in this package...

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-30 : 13:16:01
for error you can configure it from nonmatch output of lookup task. then add a oledb destination and populate the records onto a table. then outside data flow task where you transfer data add another data flow task to transfer the error data from table using oledb source to flat file destination to get it in file. then add a send mail task to send the file as an attachment in mail to supervisor.

so in short package will be like

Data Flow task(text source-> lookup-> success records to oledb destination table
-> error records to oledb error table )
data flow task(oledb source error table -> error file destination)
send mail task (attachment:error file,to: supervisor email)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

srisql
Starting Member

3 Posts

Posted - 2011-09-30 : 14:10:28
Thank you so much...I got it
Go to Top of Page

srisql
Starting Member

3 Posts

Posted - 2011-09-30 : 14:24:28
Hello Visakh,

Could you please tell me the factors we need to consider when importing the data from ORACLE or SYBASE to SQL Server..like data types etc..,like what things we need to worry about...

Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-01 : 14:22:29
the most important thing is finding compatible data types.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -