|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
help req in procedure
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 |
|
#2
|
|||
|
|||
|
Sorry,
Your problem sound pretty simple but apparantly i dont understand your question ? you could write a simple procedure that would do it. first get the correct record using a query (you could use 'sort by' to come up with the latest date) and then update with the value. OR is your question as to how to do all this in one update statement ? J |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > help req in procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|