Hi All,
I struck up doing a job here. I have a data file in the following format.
LOC DEPT STOCK
10, 1, 10
, 2, 20
, 3, 15
, 4, 15
20, 5, 10
, 8, 15
, 12, 12
30, 25, 15
, 30, 15
I have to assign the LOC '10' to the 2nd,3rd,4th records and LOC '20' to the next two records and 30 to the next record. Can any one help me in doing this job.
The ouput of the job should be
LOC DEPT STOCK
10, 1, 10
10, 2, 20
10, 3, 15
10, 4, 15
20, 5, 10
20, 8, 15
20, 12, 12
30, 25, 15
30, 30, 15
I appreciate your time and help in advance
Thanks
Lotus
Assigning Column value from previous row column value
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
-
- Participant
- Posts: 106
- Joined: Thu Jul 27, 2006 10:05 pm
- Location: Mumbai
try this ,this may be helpful
Lotus26 wrote:I figured it out. Thanks for your time
keshav0307 wrote:sorry the varibale value shoukd be
Sprev=(If LOC<>'' Then LOC Else Sprev)
Hi all,
For this example take "lpre" and for the "lpre" variable assign the logic as " If Inputlink.Loc = " " Then lpre Else DSLink3.Loc "
In the out put derivation,assign "lpre" variable to the "LOC" column