Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL help needed

PL/SQL help needed

From: Thomas Klinger <t.klinger_at_mobilkom.at>
Date: Mon, 31 May 1999 11:56:45 +0200
Message-ID: <7itmct$8sh$1@fleetstreet.Austria.EU.net>


Hi there!

I've written this script:

begin
 select bts.name_bsc BSC,

   bts.name_bts BTS,
   bts.addr_bts ADDRESS,
   bts.ci CI,
   bts.trx1 TRX1,
   bts.frt1 FRT1,
   trx2.trx2 TRX2,
   trx2.frt2 FRT2,
   trx3.trx3 TRX3,
   trx3.frt3 FRT3,
   trx4.trx4 TRX4,
   trx4.frt4 FRT4,
   trx5.trx5 TRX5,
   trx5.frt5 FRT5,

   trx6.trx6 TRX6,
   trx6.frt6 FRT6
 from BTS_TRX_TEMP bts,
   TRX_FRT_2_TEMP trx2,
   TRX_FRT_3_TEMP trx3,
   TRX_FRT_4_TEMP trx4,
   TRX_FRT_5_TEMP trx5,

   TRX_FRT_6_TEMP trx6
 where bts.bts_id in (select bts2.bts_id from BTS_TRX_TEMP bts2)
 and  bts.bts_id = trx2.bts_id
 and  bts.bts_id = trx3.bts_id
 and  bts.bts_id = trx4.bts_id
 and  bts.bts_id = trx5.bts_id
 and  bts.bts_id = trx6.bts_id

 order by bts.name_bts;

 if bts.bts_id not in (select trx21.bts_id from TRX_FRT_2_TEMP trx21) then   trx2.trx2 := '-';
  trx2.frt2 := '-';
 end if;
end;

Q1: is this acceptable (executeable)?
Q2: I can't start it. I type in "@myscript.sql" but comes up with the next line numbers even if I type in a semicolon -> next line. Why?

This script should select from 5 different tables where not all values bts.bts_id are in each from the other tables. So there I tried to do a PL/SQL script do prevent that only those rows are selected where bts.bts_id is in all tables.
Or is there any other possiblilty?

Thanx in forward.
--
Best regards,

                  Thomas Klinger

========================================
......E-Mail: t.klinger_at_mobilkom.at..... .........WWW: http://www.mobilkom.at....
Received on Mon May 31 1999 - 04:56:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US