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

Insert into a table with unique columns from another table.

$
0
0

There are two tables,

STG_DATA                                                             

ORDER_NO    DIR_CUST_IND
1002                     DNA
1005                     GEN
1005    
1008                     NULL
1001                     NULL
1001                     NULL
1006                     NULL
1000                     ZZZ
1001                     ZZZ

FACT_DATA

ORDER_NO    DIR_CUST_IND
1005                      NULL
1006                      NULL
1008                      NULL

I need to insert only unique [ORDER_NO] from STG_DATA to FACT_DATA with corresponding [DIR_CUST_IND]. Though STG_DATA has multiple rows with same ORDER_NO, I need to insert only one of that it can be any record.


Sarvan


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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