PLS-00103: Encountered the symbol "ORDER" when expecting one ofthe following: ; [message #191434] |
Wed, 06 September 2006 06:28  |
quest_nisha
Messages: 4 Registered: August 2006 Location: Bangalore
|
Junior Member |
|
|
Hi,
I am working on 8.1.7.0.0...
I m trying to execute this procedure,
SQL> create or replace procedure yas as
2 begin
3 INSERT INTO TEMP_SEL_BTS (CELL_SEQ_NO, CELL_ID, BSC_NE_NE_ID)
4 SELECT cell_id
5 ,cell_seq_no
6 ,s.bsc_ne_ne_id
7 FROM BTS_KIT_TYPES k
8 ,CELL_SITES s
9 ,BASE_TRANSCEIVER_STATIONS b
10 ,CELLS c
11 WHERE c.alt_pla_pla_id = 0
12 AND c.alt_alt_plan_seq_num = 236356
13 AND C.CELL_NETWORK_TYPE <> 'UMTS'
14 AND b.alt_pla_pla_id = c.alt_pla_pla_id
15 AND b.alt_alt_plan_seq_num = c.alt_alt_plan_seq_num
16 AND b.csi_sit_csr = c.bts_csi_sit_csr
17 AND b.bts_seq_no = c.bts_bts_seq_no
18 AND s.alt_pla_pla_id = b.alt_pla_pla_id
19 AND s.alt_alt_plan_seq_num = b.alt_alt_plan_seq_num
20 AND s.sit_csr = b.csi_sit_csr
21 AND k.btsk_kit_name = b.btsk_kit_name
22 AND k.man_man_name = 'NOKIA'
23 AND EXISTS (SELECT 'X'
24 FROM CELLS cl
25 WHERE cl.alt_pla_pla_id = 0
26 AND cl.alt_alt_plan_seq_num = 0
27 AND cl.cell_seq_no = c.cell_seq_no)
28 ORDER BY c.bts_csi_sit_csr,c.cell_id;
29 end;
30 /
Warning: Procedure created with compilation errors.
Elapsed: 00:00:00.00
SQL> show errors
Errors for PROCEDURE YAS:
LINE/COL ERROR
-------- -----------------------------------------------------------------
28/8 PLS-00103: Encountered the symbol "ORDER" when expecting one of
the following:
; return returning and or group having intersect minus start
union where connect
its giving the error stated above...
when i run the query seperately it works fine.. but in a procedure it throws this error...
can u help plz......
|
|
|
|
|
|
|
Re: PLS-00103: Encountered the symbol "ORDER" when expecting one ofthe following: ; [message #191531 is a reply to message #191527] |
Thu, 07 September 2006 00:10   |
sandeepk7
Messages: 137 Registered: September 2006
|
Senior Member |

|
|
You can do ur things in this manner.
create or replace procedure yas as
2 begin
3 INSERT INTO TEMP_SEL_BTS (CELL_SEQ_NO, CELL_ID, BSC_NE_NE_ID)
4 SELECT cell_id, cell_seq_no,bsc_ne_ne_id from (SELECT cell_id
5 ,cell_seq_no
6 ,s.bsc_ne_ne_id
7 FROM BTS_KIT_TYPES k
8 ,CELL_SITES s
9 ,BASE_TRANSCEIVER_STATIONS b
10 ,CELLS c
11 WHERE c.alt_pla_pla_id = 0
12 AND c.alt_alt_plan_seq_num = 236356
13 AND C.CELL_NETWORK_TYPE <> 'UMTS'
14 AND b.alt_pla_pla_id = c.alt_pla_pla_id
15 AND b.alt_alt_plan_seq_num = c.alt_alt_plan_seq_num
16 AND b.csi_sit_csr = c.bts_csi_sit_csr
17 AND b.bts_seq_no = c.bts_bts_seq_no
18 AND s.alt_pla_pla_id = b.alt_pla_pla_id
19 AND s.alt_alt_plan_seq_num = b.alt_alt_plan_seq_num
20 AND s.sit_csr = b.csi_sit_csr
21 AND k.btsk_kit_name = b.btsk_kit_name
22 AND k.man_man_name = 'NOKIA'
23 AND EXISTS (SELECT 'X'
24 FROM CELLS cl
25 WHERE cl.alt_pla_pla_id = 0
26 AND cl.alt_alt_plan_seq_num = 0
27 AND cl.cell_seq_no = c.cell_seq_no)
28 ORDER BY c.bts_csi_sit_csr,c.cell_id);
29 end;
30 /
|
|
|
|
Re: PLS-00103: Encountered the symbol "ORDER" when expecting one ofthe following: ; [message #191650 is a reply to message #191527] |
Thu, 07 September 2006 08:11   |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
quest_nisha wrote on Wed, 06 September 2006 23:43 | Ya i have to put the data in order... Any one knows why its happenning
|
I don't think you understand the concept of putting data in order in a table. There is no such thing as order in a relational database. Granted, as Frank said if you were inserting into a table and generating a sequence with that insert, then you would need to "select" the data in some defined order, but since you are doing a straight insert as select, it has no meaning.
|
|
|
|
|