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