Help Help Help Help Help Help Help Help Help Help Help Paleeeeeezzzzzzz!!!!!!!!

From: <RogerRabbit_at_TuneTownUSA.com>
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;

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 

   (NUM 15.2 NOT NULL)
6. The row the information is from the EQUIPMENT table and is

   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 one
    end 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

Original text of this message