I am trying to run the following query in SQL Developer, but I am receiving an error. I am trying to declare two local variables (var_num1 and payDate) and then set the variables. Does anyone know what I can be doing incorrectly? I know Oracle SQL is a little different than SQL Server.
DECLARE
var_num1 number;
payDate date;
BEGIN
var_num1 := 100;
payDate := '10/1/2013'
BEGIN
SELECT * FROM Paycode WHERE PaycodeID = var_num1 and PaycodeDate = payDate;
End;
END;
Error report:
ORA-06550: line 6, column 2:
PLS-00428: an INTO clause is expected in this SELECT statement
06550. 00000 - "line %s, column %s:
%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…