insert into new row with max of effdate

Moderators: chulett, rschirm

Post Reply
seshikumar
Participant
Posts: 44
Joined: Fri Mar 16, 2007 5:51 am

insert into new row with max of effdate

Post by seshikumar »

Suppose an employee has 3 Effective dated rows in xx table

JOB.EFFDATEs:

1/1/2007

1/1/2008

1/1/2009

And the last_sal_change_date is 5/1/2008. So in this case the last_sal_change_date does not match to any of the JOB.EFFDT.

So we need to fetch the Max JOB.EFFDT that is <= last_sal_change_date and in the example above this will be 1/1/2008.

We need to copy the data for EFFDT 1/1/2008 and change the EFFDT to 5/1/2008 (last_sal_change_date) ..

please help design the job ...thanks
seshu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: Please post questions unrelated to 'Data Integration' in other forums based on the type of job - there are specific forums for Server and Parallel issues, this isn't the proper place.

Thanks.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply