Help Help Help Help Help Help Help Help Help Help Help Paleeeeeezzzzzzz!!!!!!!!
Date: 1996/11/26
Message-ID: <329b314c.11287833_at_news.primenet.com>#1/1
I have a problem that I need to solve at work, and thinking that
there is a good chance that someone in this conference/news group
would know how to tackle it, I decided to give this avenue a try...
Here it is;
(NUM 15.2 NOT NULL)
1. I need to update a table with information from another table.
2. These two tables are 'linked' by their equipment number (eqnum).
3. Table names are PM and EQUIPMENT.
4. The two rows (fields) are of the same type/size and match.
5. The row to update is from the PM table and is called PM1
called METERREADING (NUM 15.2 NOT NULL)
The way I was thinking about doing this would be using the logic listed below. If someone could help me in the syntax and correct pl/sql-or just sql statments... I would be in your dept... (and yes I do payoff!!!)
open the EQUIPMENT table
open the PM table
get record 1 from EQUIPMENT
get record 1 from PM
loop
loop
if pm.eqnum=equipment.eqnum then
update pm.pm1 with equipment.meterreading goto top of pm table exit loop else if not eof then incr PM table by oneend if
if eof then exit loop
end loop
if not eof then incr EQUIPMENT table by one end loop
This might have holes in it (and probably does), so feel free to suggest away.
Other usefull information that might be needed...
* These tables are insalled on a Oracle v7.1 rdbms.
- This has to 'batch run' nightly.
If there are any other questions that you need to ask (if there is someone nice enough to help) you can contact me at motofox_at_primenet.com) Thanx alot in advance... Received on Tue Nov 26 1996 - 00:00:00 CET