Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 19th, 2004, 01:38 AM
Sasi242 Sasi242 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 9 Sasi242 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 22 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 19th, 2004, 10:14 AM
jiggee jiggee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 27 jiggee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 27 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > help req in procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway