> >Effdate d && effective date >taxrate n(5,2) && tax rate > >records in taxmaster.dbf && no of records can change in taxmaster.dbf > >Effdate Taxrate >01.04.2007 0.00 >15.06.2007 4.00 >01.07.2007 12.50 > > > > >schild.dbf have 6 fileds && more than 5000 records with diffrent billdates. > >billdate d >billno c(8) >product c(50) >quantity n(10,3) >rate n(10,2) >taxrate n(5,2) > > >billdate billno product quantity rate taxrate >02.04.2007 001001 abc 5 500.00 ?? should be 0.00 >03.04.2007 001001 abc 5 500.00 ?? should be 0.00 >04.04.2007 001001 abc 5 500.00 ?? should be 0.00 >05.05.2007 001001 abc 5 500.00 ?? should be 0.00 >04.06.2007 001001 abc 5 500.00 ?? should be 4.00 >05.06.2007 001001 abc 5 500.00 ?? should be 4.00 >08.06.2007 001001 abc 5 500.00 ?? should be 4.00 >10.07.2007 001001 abc 5 500.00 ?? should be 12.50 >12.07.2007 001001 abc 5 500.00 ?? should be 12.50 >18.07.2007 001001 abc 5 500.00 ?? should be 12.50 >21.07.2007 001001 abc 5 500.00 ?? should be 12.50 >25.07.2007 001001 abc 5 500.00 ?? should be 12.50 > >>
UPDATE sChild SET taxRate = NVL((Select taxRate From taxMaster; WHERE taxMaster.effDate = sChild.billDate), taxRate)P.S.: I think that isn't better option in relation about performance.