Select in PL-SQL Errors: INTO After Select
- by levi
I've the following query in a test script window
declare
-- Local variables here
p_StartDate date := to_date('10/15/2012');
p_EndDate date := to_date('10/16/2012');
p_ClientID integer := 000192;
begin
-- Test statements here
select d.r "R",
e.amount "Amount",
e.inv_da "InvoiceData",
e.product "ProductId",
d.system_time "Date",
d.action_code "Status",
e.term_rrn "IRRN",
d.commiount "Commission",
0 "CardStatus"
from docs d
inner join ext_inv e on d.id = e.or_document
inner join term t on t.id = d.term_id
where d.system_time >= p_StartDate
and d.system_time <= p_EndDate
and e.need_r = 1
and t.term_gr_id = p_ClientID;
end
Here is the error:
ORA-06550: line 9, column 3:
PLS-00428: an INTO clause is expected in this SELECT statement
I've been using T-SQL for a long time and I'm new to pl-sql
What's wrong here?