Data Updates
Page 1 of 1
Data Updates
Please through your views on the below Issue-
There is a Emp table in the DB. Every day the file will be getting updated. Once the data in the Emp table gets updated, the table contains only updated data. For few columns if there might be no updations based on the source data. The Issue is we needs to find a way which tells us which column value got updated.
Example:-
Emp_Table
-------------
Update Emp_Table
set
A.Emp_ID=B.Emp_ID,
A.EMP_Name=A.EMP_Name,
A.SSN=B.SSN,
A.ADDRESS=B.ADDRESS,
A.GENDER=B.GENDER,
---
---
---
---
A.STATUS=B.STATUS
from Emp_Table A, Emp_source B
where A.Emp_ID=B.Emp_ID
Note: One thing needs note is some times Emp_source may comes with 4 to 5 days of updates with a date column. Every change needs to be captured like, which columns are getting updated. After Emp_Table gets updated, this table contains only one record per Emp_ID.
Hopes this will be little tricky. Help me with sample script.
Thanks in Advance.
-Balas
There is a Emp table in the DB. Every day the file will be getting updated. Once the data in the Emp table gets updated, the table contains only updated data. For few columns if there might be no updations based on the source data. The Issue is we needs to find a way which tells us which column value got updated.
Example:-
Emp_Table
-------------
Update Emp_Table
set
A.Emp_ID=B.Emp_ID,
A.EMP_Name=A.EMP_Name,
A.SSN=B.SSN,
A.ADDRESS=B.ADDRESS,
A.GENDER=B.GENDER,
---
---
---
---
A.STATUS=B.STATUS
from Emp_Table A, Emp_source B
where A.Emp_ID=B.Emp_ID
Note: One thing needs note is some times Emp_source may comes with 4 to 5 days of updates with a date column. Every change needs to be captured like, which columns are getting updated. After Emp_Table gets updated, this table contains only one record per Emp_ID.
Hopes this will be little tricky. Help me with sample script.
Thanks in Advance.
-Balas
Balas- Posts : 11
Join date : 2012-04-26
Similar topics
» How to Handle Updates to Dimension Attributes (SCD 1) that have a Cardinality > 1 (Context is Data Warehouse Star Schema)
» Thoughts about SAP BW? I could use some fresh viewpoints...
» Best method for incremental fact load (inserts and updates) using SSIS
» Looking for a Data Architect/Data Modeler for NYC Big Data Startup
» difference between data mart and data warehouse at logical/physical level
» Thoughts about SAP BW? I could use some fresh viewpoints...
» Best method for incremental fact load (inserts and updates) using SSIS
» Looking for a Data Architect/Data Modeler for NYC Big Data Startup
» difference between data mart and data warehouse at logical/physical level
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|