pls-00428

display select results inside anonymous block

爷,独闯天下 提交于 2019-12-21 12:01:16
问题 I'm trying to debug a SELECT inside a procedure, and I'm trying to this using a anonymous block. I would like that SQL Developer simply return the last SELECT statement, but I get the error: ORA-06550: line 21, column 5: PLS-00428: an INTO clause is expected in this SELECT statement Inside the procedure, I have an INTO for that select, but is there a simple way that I can simply get the results for the last SELECT statement for my debugging? I'm using anonymous block and variables so that the

Error(2,7): PLS-00428: an INTO clause is expected in this SELECT statement

岁酱吖の 提交于 2019-12-13 02:21:06
问题 I'm trying to create this trigger and getting the following compiler errors: create or replace TRIGGER RESTAR_PLAZAS AFTER INSERT ON PLAN_VUELO BEGIN SELECT F.NRO_VUELO, M.CAPACIDAD, M.CAPACIDAD - COALESCE(( SELECT count(*) FROM PLAN_VUELO P WHERE P.NRO_VUELO = F.NRO_VUELO ), 0) as PLAZAS_DISPONIBLES FROM VUELO F INNER JOIN MODELO M ON M.ID = F.CODIGO_AVION; END RESTAR_PLAZAS; Error(2,7): PL/SQL: SQL Statement ignored Error(8,5): PL/SQL: ORA-00933: SQL command not properly ended Error(8,27):

display select results inside anonymous block

橙三吉。 提交于 2019-12-04 03:11:55
I'm trying to debug a SELECT inside a procedure, and I'm trying to this using a anonymous block. I would like that SQL Developer simply return the last SELECT statement, but I get the error: ORA-06550: line 21, column 5: PLS-00428: an INTO clause is expected in this SELECT statement Inside the procedure, I have an INTO for that select, but is there a simple way that I can simply get the results for the last SELECT statement for my debugging? I'm using anonymous block and variables so that the code is as similar as possible from what's actually inside the procedure, so that I don't have to

Using variables in PLSQL SELECT statement

孤街浪徒 提交于 2019-11-28 13:50:08
I have a query that queries on ReportStartDate and ReportEndDate so I thought I would use variables in PLSQL. Not sure what I am missing here, but I get an error: CLEAR; DECLARE varReportStartDate Date := to_date('05/01/2010', 'mm/dd/yyyy'); varReportEndDate Date := to_date('05/31/2010', 'mm/dd/yyyy'); BEGIN SELECT 'Value TYPE', 1 AS CountType1, 2 AS CountType2, 3 AS CountType3 FROM DUAL; SELECT COUNT (*) FROM CDR.MSRS_E_INADVCH WHERE 1=1 AND ReportStartDate = varReportStartDate AND ReportEndDate = varReportEndDate ; END; / The Error is: Error starting at line 2 in command: Error report: ORA

Using variables in PLSQL SELECT statement

喜你入骨 提交于 2019-11-27 07:57:42
问题 I have a query that queries on ReportStartDate and ReportEndDate so I thought I would use variables in PLSQL. Not sure what I am missing here, but I get an error: CLEAR; DECLARE varReportStartDate Date := to_date('05/01/2010', 'mm/dd/yyyy'); varReportEndDate Date := to_date('05/31/2010', 'mm/dd/yyyy'); BEGIN SELECT 'Value TYPE', 1 AS CountType1, 2 AS CountType2, 3 AS CountType3 FROM DUAL; SELECT COUNT (*) FROM CDR.MSRS_E_INADVCH WHERE 1=1 AND ReportStartDate = varReportStartDate AND