Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
SQL Developer log has no source/message

I'm not sure if I'm missing something obvious here. I have a stored procedure for my Oracle SQL server (11g).
I'm using flow control to keep my INSERT, UPDATE, DELETE functionality within 1 stored procedure. The weird issue I'm running into is that all of the functionality of this works, but when running an UPDATE or DELETE I receive a log from SQL Developer that has no source or message. The proper changes are committed to the database, but I receive an annoying blank log and I am just confused at this point.
Any info would be great! Thanks
create or replace PROCEDURE DRAWINGOPERATION ( P_CURSOR OUT SYS_REFCURSOR , P_OPERATION IN VARCHAR2 , P_DRAWINGID IN NUMBER , P_DRAWINGDATE IN DATE , P_PRIZEAMOUNT IN VARCHAR2 , P_GAMEID IN NUMBER ) AS BEGIN DECLARE return_drawingid NUMBER; BEGIN CASE p_operation WHEN 'INSERT' THEN GOTO c_Insert; WHEN 'UPDATE' THEN GOTO c_Update; WHEN 'DELETE' THEN GOTO c_Delete; ELSE GOTO end_sec; END CASE; <<c_Insert>> INSERT INTO DRAWING(GAMEID,DRAWINGDATE,PRIZEAMOUNT) VALUES (p_gameid,p_drawingdate,p_prizeamount) RETURNING DRAWINGID INTO return_drawingid; COMMIT; OPEN P_CURSOR FOR SELECT * FROM DRAWING WHERE DRAWINGID = return_drawingid; GOTO end_sec; <<c_Update>> IF p_drawingdate IS NOT NULL THEN UPDATE DRAWING SET DRAWINGDATE = P_DRAWINGDATE WHERE DRAWINGID = P_DRAWINGID; END IF; IF p_prizeamount IS NOT NULL THEN UPDATE DRAWING SET PRIZEAMOUNT = P_PRIZEAMOUNT WHERE DRAWINGID = P_DRAWINGID; END IF; COMMIT; GOTO end_sec; <<c_Delete>> --PRIMARY KEY DELETE DELETE FROM DRAWING WHERE drawingid = P_DRAWINGID; GOTO end_sec; <<end_sec>> NULL; END; END DRAWINGOPERATION;
Answers
-
Oracle SQL server (11g).
Just to avoid any confusion SQL server is a Microsoft product.
all of the functionality of this works,
You might want to add some validation of the parameters, some exception handling and a commit statement after a delete.
when running an UPDATE or DELETE I receive a log from SQL Developer that has no source or message.
What version of sql developer are you using?
What 'log' are you talking about and/or expecting?
Tell us what you are doing in sql developer that would create a log.
-
Hi
While I don't believe this is the problem -- avoid using GOTO at all costs ! Use nested if then else.....
-
I see nothing in that piece of code which would produce any output. What are you expecting?