Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> using decode in procedure

using decode in procedure

From: Paul Fell <novaweb_at_iinet.net.au>
Date: 10 Apr 2002 19:56:05 -0700
Message-ID: <4b270a4e.0204101856.49287f0b@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US