In my source table i have flag column it contains "Y" or "Null"
If Source column = 'Y' i need to set CurrentDate() Else SetNull()
Today i populate data into the target column with currentdate(20060918) where source column = 'Y'.
when i try to extract data tomorrow same row will come but i dont want to change my target date to todays date.
That means when the flag becomes 'Null' to 'Y' then only i will populate date after that i dont want change the date.
Target Table:
loading data into oracle with insert and update query.
can any one please help me regarding this..
Thanks in advance
Samba
Column Flag
Moderators: chulett, rschirm, roy
You will have to join your source data with your Target table and bring in the CurrentDate column. Now you will have two columns 1. CurrentDateFlag from source and 2.CurrentDate from Target.Now put a derivation in the TargetDate column.
Post edited
Code: Select all
If IsNull(Target.CurrentDate) and IsNull(source.Flag) Then SetNull() Else If Not(IsNull(Target.CurrentDate)) then Target.CurrentDate Else CurrentDate()
Post edited
Last edited by kris007 on Mon Sep 18, 2006 2:38 pm, edited 2 times in total.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
do something like this :
Code: Select all
If current date is not null and if Source column = 'Y' set CurrentDate() Else SetNull()