sasi242
October 19th, 2004, 02:19 AM
Hi All
select * from products_brought;
pno pdate pqty sqty
1 02-sep-04 800
2 07-sep-04 250
3 09-sep-04 300
select * from products_sold;
sno sdate sqty
1 07-sep-04 300
2 10-sep-04 1000
the above mentioned are my tables where i am purchasing,selling records are enterd.
i would like to sell the last purchased products first(where sold date should be greater than purchase date) and i want to update the qtysold in the above purchase table.
Thanks In Advance
Sasidhar
select * from products_brought;
pno pdate pqty sqty
1 02-sep-04 800
2 07-sep-04 250
3 09-sep-04 300
select * from products_sold;
sno sdate sqty
1 07-sep-04 300
2 10-sep-04 1000
the above mentioned are my tables where i am purchasing,selling records are enterd.
i would like to sell the last purchased products first(where sold date should be greater than purchase date) and i want to update the qtysold in the above purchase table.
Thanks In Advance
Sasidhar