Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> using decode in procedure
Oracle 9i
I want to use the following :
Select decode (a.Description, 'Company
Wide','Corporate',a.Description) Parent_Organisations,
c.Description Divisions, c.Code Division_Codes from tblLUBusinessGroup a INNER JOIN tblDivisionLink b ON b.Business_Group_Code = a.Code LEFT JOIN tblLUDivision c ON c.Code = b.Division_Code Order By a.Description, c.Description;
This same code works in SQL*Plus, but when I try to compile in a procedure I get the error message :
"PLS-00428: an INTO clause is expected in this SELECT statement"
The decode is meant to return 'Corporate' where the value is 'Company Wide' otherwise default to the value of the field.
Any help much appreciated.
thanks
Paul
Received on Wed Apr 10 2002 - 21:56:05 CDT