Below declare of package is correct or wrong
ACT1 IN OUT GLOBALPKG.ACT1
Thanks for your assistance
Printable View
Below declare of package is correct or wrong
ACT1 IN OUT GLOBALPKG.ACT1
Thanks for your assistance
What?????? :confused: :rolleyes:
is in out in the syntax is right or wrong
Look at this from http:/tahiti.oracle.comQuote:
Originally Posted by vision
And if you are passing large objects you might consider adding the nocopy directive, which is the same as pass by reference.
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.Quote:
Originally Posted by jmodic
But I'm this erorr where do I need to declare the package
38 PLS-00201: identifier GLOBALPKG.ACT1 must be declared
It would help to see the context for this code as well as the entire error message.Quote:
Originally Posted by vision
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
Who owns GLOBALPKG? Make sure you have the right direct grants.
Code:SELECT *
FROM dba_dependencies
WHERE NAME = 'GLOBALPKG';
SELECT *
FROM DBA_TAB_PRIVS
WHERE grantee = 'AUDIT';