| | |
Need Help! Split a record into 2 record.
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 2
Reputation:
Solved Threads: 0
Hi,
I am trying to break each record into 2 records but failed
Is it possible using SSIS?
If not, what is the correct way to do it?
Thanks in advance!!!
For Example:
I have a table that contains 100 records . Each record has the following 10 columns:
Col1, Col2, Col3, Col4, Col5, Col6, Col7
A MT 30 UK 0 70 FR
A SM 30 IL 0 0 PS
And that the result that I want to achieve for the 2 records:
ID JoinID Col1, Col2, Col3, Col4
1 1 Col1 MT UK Yes
2 1 Col3 MT FR No
3 2 Col1 SM IL Yes
4 2 Col3 SM PS Yes
ID - An Incremental id
JoinID - A Join ID to join the 2 records
Col1 - Contains the Col1 title for the first line And Col3 title for the second line.
Col2 - Contains the Col2 value for both lines.
Col3 - Contains the Col4 value for the first line And Col7 value for the second line.
Col4 - If Col5 value = 0 Then the value for the first line is 'Yes' Else 'No'
And for the second line, if Col6 value = 0 Then the value 'Yes' Else 'No'
I am trying to break each record into 2 records but failed
Is it possible using SSIS?
If not, what is the correct way to do it?
Thanks in advance!!!
For Example:
I have a table that contains 100 records . Each record has the following 10 columns:
Col1, Col2, Col3, Col4, Col5, Col6, Col7
A MT 30 UK 0 70 FR
A SM 30 IL 0 0 PS
And that the result that I want to achieve for the 2 records:
ID JoinID Col1, Col2, Col3, Col4
1 1 Col1 MT UK Yes
2 1 Col3 MT FR No
3 2 Col1 SM IL Yes
4 2 Col3 SM PS Yes
ID - An Incremental id
JoinID - A Join ID to join the 2 records
Col1 - Contains the Col1 title for the first line And Col3 title for the second line.
Col2 - Contains the Col2 value for both lines.
Col3 - Contains the Col4 value for the first line And Col7 value for the second line.
Col4 - If Col5 value = 0 Then the value for the first line is 'Yes' Else 'No'
And for the second line, if Col6 value = 0 Then the value 'Yes' Else 'No'
![]() |
Similar Threads
- Fixed width to csv conversion (Python)
- Split text and store it in arraylist [ problem with code] (Java)
- ASP vbscript recordset paging headache (ASP)
- Database manipulation with AVL tree.. please help (Java)
- Strange issue with arrays (Perl)
- noob on perl... please help (Perl)
- Saving Entered Data (C++)
- Perl Script Help (Perl)
- perl script help re: scope/structure for noob (Perl)
- Primary Key Issue (Visual Basic 4 / 5 / 6)
Other Threads in the Database Design Forum
- Previous Thread: Hotel Reservation System - Help me on Designing an ER
- Next Thread: Help with table structure in personal finance database
| Thread Tools | Search this Thread |





