Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SPLIT DATA TO MULTIPLE TABLES FROM SINGLE TABLE

$
0
0

Hi All

I want to  split one table into multiple tables based on the grouping in the table.

For eg. my table looks something like this

MainTable

col1        col2  col3 col4
Temp1     org   21   1
Temp1     wal   78   3
Temp2     abc   33   43
Temp2     PHD  54   23
Temp2     omg  34   44
Temp3     OPS  22   22
Temp3     DER  32   55
Temp3     OMF  44   44    etc  And i want to split this into multiple tables like

Table1
col1        col2  col3 col4
Temp1     org   21   1
Temp1     wal   78   3

Table 2

col1        col2  col3 col4

Temp2     abc   33   43
Temp2     PHD  54   23
Temp2     omg  34   44

etc....

The problem is each time when the data comes to maintable the value of COL1 changes(ie Temp1,Temp2 are renamed) ,so its hard to use Conditional Split for spliting the data.

Any Idea how to get there...

Thanks In Advance

Vinesh


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>