Questions tagged [pls-00428]

9 questions
10
votes
5 answers

display select results inside anonymous block

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…
Pascal
  • 2,944
  • 7
  • 49
  • 78
4
votes
2 answers

Using variables in PLSQL SELECT statement

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'); …
Raj More
  • 47,048
  • 33
  • 131
  • 198
4
votes
3 answers

ORACLE- CASE requires an INTO?

When I try the following: declare var_type VARCHAR2(10); begin var_type := 'B'; select case var_type when 'B' then 'Beans' when 'L' then 'Legumes' end from tableOfBeans ; end; I get an error…
Jackson
  • 41
  • 1
  • 1
  • 2
2
votes
3 answers

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

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…
andandandand
  • 21,946
  • 60
  • 170
  • 271
0
votes
0 answers

Procedure to calculate runtime of query: PLS-00428: an INTO clause is expected in this SELECT statement

I need to calculate the runtime of a given query in Oracle - the result will eventually be written to a SQL table, so the code must be available to run as a procedure from SQL Server. Please se the script below: `DECLARE startdate DATE; enddate…
0
votes
1 answer

INTO error in SELECT while creating stored procedure in PL/SQL

I am trying to create stored procedure where I want to join two tables and save the result into one of the tables, but I am getting INTO clause is required error. This is my code: CREATE PROCEDURE DiorItemMaster AS SELECT *FROM…
cbirole
  • 27
  • 2
0
votes
1 answer

pl sql oracle subquery

I have a procedure: CREATE OR REPLACE PROCEDURE recommend_book( in_ID_user IN number ) IS --zmienne zmienna1 number(9,0); BEGIN SELECT COUNT(GENRE) INTO zmienna1 FROM BOOKS WHERE ID_BOOK IN(SELECT ID_BOOK …
monterinio
  • 49
  • 2
  • 11
0
votes
1 answer

Oracle - Is there any way I can get around SELECT INTO on PL/SQL block

I am trying to create a trigger, which automatically updates a student's application state when the application status row in the application table changes. I have been browsing the web for a little over an hour or so now and despite finding a…
Halfpint
  • 3,967
  • 9
  • 50
  • 92
0
votes
1 answer

oracle regexp_like with pattern from select

I try to select rows from a table using a regex. The pattern is the result of a select. I have the following compilation error on the select that use regexp_like: PLS-00428: an INTO clause is expected in this SELECT statement declare pattern…