Home » RDBMS Server » Server Administration » URGENT:Couldn't figure out why this statement fails.
URGENT:Couldn't figure out why this statement fails. [message #54874] Wed, 11 December 2002 15:20 Go to next message
Pramod
Messages: 18
Registered: April 1999
Junior Member
PROCEDURE get_PAC_AttrInfo
Default Property
(
nStatus out number,
nModelID in number,
nPackageID in number,
PACAttrInfoCrusor in out PACAttrInfo_Crusor
)
IS

BEGIN
-- Open the Cursor first since we will be returning a resultset
OPEN PACAttrInfoCrusor FOR
-- Our SQL Statement that will select the data into the cursor
SELECT A1.Name, 'S' InputType, A1.GroupNumber, A1.AttributeID,
(SELECT APD.Name
FROM Attributes A2
INNER JOIN AttributeProperties AP
ON A2.AttributeID = AP.AttributeID
INNER JOIN ModelInt_Selections MIS
ON AP.AttributePropertyID = MIS.AttributePropertiesID
INNER JOIN AttrPropertyDictionary APD
ON AP.AttrPropertyDictionaryID = APD.AttrPropertyDictionaryID
WHERE A2.AttributeID = A1.AttributeID) DefaultProperty
FROM Attributes A1
WHERE ModelID = nModelID;
-- Set return status = 0 (Success)
nStatus := 0;
EXCEPTION
-- This is where we will jump if any type of error happens
WHEN OTHERS THEN
-- Set return status (Failure)
nStatus := ERR_GET_FAILURE;
-- This will force an error to raise up to the client application
RAISE_APPLICATION_ERROR(ERR_GET_FAILURE, SQLERRM);
END get_PAC_AttrInfo;

##################
Error I get
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:

THANX in advance.
Re: URGENT:Couldn't figure out why this statement fails. [message #54879 is a reply to message #54874] Thu, 12 December 2002 06:26 Go to previous messageGo to next message
B
Messages: 327
Registered: August 1999
Senior Member
Run ur 'select' .. it's seem that's an incorrect query ... rewrite it.
Re: URGENT:Couldn't figure out why this statement fails. [message #54904 is a reply to message #54874] Sat, 14 December 2002 03:12 Go to previous message
LM
Messages: 1
Registered: December 2002
Junior Member
Believe your problem is in the third line. this does'nt appear to be the normal nested query format. You have SELECT XXX, SELECT ...

SELECT A1.Name, 'S' InputType, A1.GroupNumber, A1.AttributeID,
(SELECT APD.Name
Previous Topic: Can I set a massive delete transaction not use roll back segment
Next Topic: storing word documents in oracle
Goto Forum:
  


Current Time: Fri Dec 27 18:23:52 CST 2024