This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 90093 - SQL script not detected correctly
Summary: SQL script not detected correctly
Status: RESOLVED DUPLICATE of bug 84276
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-27 14:14 UTC by tomzi
Modified: 2006-11-28 13:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2006-11-27 14:14:30 UTC
It seems that DB Explorer detects ';' as the end of a batch statement, which is
not working universally, for e.g when creating a sequence:

Following script (oracle database) is to be executed:
-----------------------------------------------------

CREATE OR REPLACE FUNCTION F_NEXT_TRIPLE_ID
   RETURN NUMBER
IS
   triple_id   NUMBER (16);
BEGIN
   SELECT SEQ_NEXT_TRIPLE_ID.NEXTVAL
     INTO triple_id
     FROM DUAL; -- system dummy table

   RETURN triple_id;
END;

it returns:
-----------

Executed successfully in 0,05 s, 0 rows affected.
Line 1, column 1

Error code 6550, SQL state 65000: ORA-06550: line 4, column 14:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ;
Line 5, column 1

Error code 900, SQL state 42000: ORA-00900: invalid SQL statement
Line 10, column 4

Error code 900, SQL state 42000: ORA-00900: invalid SQL statement
Line 11, column 1

Execution finished after 0,05 s, 3 error(s) occurred.

Thus following erroneous SEQUENCE has been created:
---------------------------------------------------

create or replace FUNCTION F_NEXT_TRIPLE_ID
   RETURN NUMBER
IS
   triple_id   NUMBER (16)
Comment 1 Andrei Badea 2006-11-28 13:24:42 UTC

*** This issue has been marked as a duplicate of 84276 ***