Depends on what that line of code actualy reepresents. If it is a declaration of a procedure/function parameter and if the "GLOBALPKG.ACT1" represents a user-defined datatype, then yes, it could be a valid line of PL/SQL code. What actually bothers you regarding "in out"? Any function/procedure parameter can be of type "IN", "OUT" or "IN OUT".
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Depends on what that line of code actualy reepresents. If it is a declaration of a procedure/function parameter and if the "GLOBALPKG.ACT1" represents a user-defined datatype, then yes, it could be a valid line of PL/SQL code. What actually bothers you regarding "in out"? Any function/procedure parameter can be of type "IN", "OUT" or "IN OUT".
IN OUT is fine, but if you pass by value Oracle will create a new version of the variable and populate it. Which for a Varchar2 or a Number is fine, but if the parameter is large, and if you are going to return an updated value anyway you might as well pass by reference.
this is entire code
CREATE OR REPLACE PROCEDURE Audit.STD_Sheet_GETVITALS
(
case_id IN INT DEFAULT NULL,
cetype IN VARCHAR2 DEFAULT null,
ACT1 IN OUT GLOBALPKG.ACT1
)
AS
lookup_type VARCHAR2(10);
BEGIN
lookup_type := '100001';
/* This is the lookup value for the vitals stored in the gen_node tables*/
/* Get the non vital data*/
OPEN ACT1 FOR
SELECT
'Variable Prompt' as prompt_label,
node_descrp as prompt,
'Variable Value' as flow_value_label,
flow_value,
'Date Time' as flow_datetime_label,
flow_datetime,
'Comments' as flow_comment_label,
flow_comment
FROM doc_flowsheet,
sys_tree,
sys_node
WHERE tree_id = flow_treeid
AND (tree_nodeid = node_id)
AND (flow_handle = case_id
AND flow_cetype != lookup_type)
UNION
SELECT/* Get the vital data. We get the description */
'Variable Prompt' as prompt_label,
gnode_descrp as prompt,
'Variable Value' as flow_value_label,
flow_value,
'Date Time' as flow_datetime_label,
flow_datetime,
'Comments' as flow_comment_label,
flow_comment
FROM doc_flowsheet,
gen_node
WHERE gnode_id = flow_treeid
AND (flow_handle = case_id
AND flow_cetype = lookup_type)
ORDER BY prompt,
flow_value,
flow_datetime;
END;
/
I'm getting this error
LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
5/38 PLS-00201: identifier 'GLOBALPKG.ACT1' must be declared
Bookmarks