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 2005 Forums
 SSIS and Import/Export (2005)
 Designing of SSIS having different scenario

Author  Topic 

under2811
Constraint Violating Yak Guru

366 Posts

Posted - 2008-09-24 : 11:53:50
Hi,

I have few scenarios where I need to design SSIS..

Scenario1: How to join two text files and put single record in DB table
like my text file contains
Text1.txt
ID|Name
1|ABC
2|DEF
3|HIJ
Text2.txt
ID|City
1|ZZZ
2|MMM
3|LLL

my DB table EMP should get record like
ID--Name--City
1--ABC--ZZZ
2--DEF-MMM
3--HIJ--LLL

scenario2:In text file records like
Name
ABC,ZZZ
DEF,XXX
HIJ,KKK
text file contains records (first name & last name) having CSV.
my DB table EMP have columns like FirstName & LastName
my out put should get
FirstName--LastName
ABC--ZZZ
DEF--XXX
HIJ--KKK

scenario3: I have table having different customer information
like
CustID--ProductID--ProductName
1--10--WoodStand
1--20--WoodTable
2--10--WoodStand
3--30--Chair
3--40--RowTable
3--50--FinishedGood

I need to export these records in text file and put into repective customer folder on my D:Structure of folder is D:\CustID1\Text1.txt
D:\CustID2\Text2.txt
D:\CustID3\Text3.txt

but i dont know how many customers I have in table.

Please help me out
T.I.A

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-24 : 12:04:17
Scenario1
-------------
1.Data Flow task inside which
a,Two Flat File Source to connect to both files
b,Merge Join task to merge the records from both based on ID
c,OLEDB destination to insert the values to destination table.

Scenario2
----------
1.Data Flow task inside which
a,One Flat File Source to connect to text files
b,Derived Column Task to get two columns (first name & last name) values
c,OLEDB destination to insert values to table.

Scenario3
--------------
1.data flow task which
a,OLEDB source to get table data
b,SQL task get count of customers
c,ForEachLoop to loop for each customer
d,Flat file destination to move only reqd customers data to file.
Go to Top of Page

under2811
Constraint Violating Yak Guru

366 Posts

Posted - 2008-09-25 : 03:31:51
Hi

Really Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-25 : 04:19:02
welcome again
Go to Top of Page
   

- Advertisement -