Privilege(s) on package body
How can I allow other users to view a package body stored in my schema? What privileges I need to grant?
Hi,
Your dba should give you select privilege on dba_source to you.
From dba_source you can view the text of package body of any user.
Hope this helps.
Raghu
Similar Messages
-
Privilege to view package body
Hi all,
I have two users... user 'A' and user 'B' (real user names changed to protect the innocent). User A creates a package spec and package body.
I want user B to be able to see the code in the package body that user A owns. Ideally I would like user B to be able to view the body code in TOAD via the schema browser or via a DESC. Is this possible?
Thanks,
Scott
PS user B can see the package spec just fine...Having the execute privilege on a package should not give anyone the ability to see the source for the package body in all_source and if definitely does not give the user the ability to change the package. The privilege only allows them to execute the package.
By default only the owner and DBA privileged users can read both the package specification and the body from all_source. Having execute privilege will allow a user to read the specification.
One way to provide access is to create your own version of the all_source views and grant this to whoever needs the access. You can either write a very specific tailored view for the one user or create a user security table that you use to control who can see what via this special view. Plus you have to grant select access to the special view before anyone can use it.
HTH -- Mark D Powell -- -
Hi All,
I am using OWB11.2,
When i deploying a very simply mapping.
i met the following error
ORA 06550 PACKAGE BODY line 15 column 13: PL/SQL: 101031:insufficient privileges
ORA 06550 PACKAGE BODY line 11, column 2: PL/SQL: SQL statement ignored
i have grant source's 'select' privilege to target schema
i have add the target schema to owb user group and from 'security' i tick all privllege to target schema
don't know what else privilege do i need to add to target schema.
Thanks for you attention.Hi,
if your error statement is
FROM
"SCHEMA_SOURCE"."TABLE_NAME_SOURCE" "ALIAS"
then you need direct grant on object "TABLE_NAME_SOURCE" from "SCHEMA_SOURCE"-user to target user (package owner).
GRANT SELECT /* ALL */ ON "SCHEMA_SOURCE"."TABLE_NAME_SOURCE" TO package_owner.
Best Regards,
IM
Edited by: user9014055 on 21.02.2012 06:26 -
Issue with viewing Package Body in SQL Developer 2.1 RC1
Were anybody able to see the package body of other user in 2.1 RC1.
I had an issue since 2.1 EA 1 so... just curious.
- Oracle 9i
- Windows XP SP3
Please do let me know if there is any hint or setting that can be change to view the package body.
Thanks!Thanks for your msg.
Below is the info:
1.
SQL: SELECT * FROM v$version;
Result:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
"CORE 9.2.0.8.0 Production"
TNS for Solaris: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
2.
Result:
The account has 'EXECUTE' privilege on the package.
3.
SQL: SELECT username "User"
,granted_role "Granted_Role"
,initcap(admin_option) "Admin_Option"
,initcap(default_role) "Default_Role"
FROM user_role_privs
ORDER BY username
,granted_role;
Result:
User``````````Granted_Role```````````Admin_Option``Default_Role
~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~
USER_NAME```SELECT_CATALOG_ROLE``No````````````Yes
4.
SQL:
SELECT privilege "Privilege"
,initcap(admin_option) "Admin_Option"
FROM user_sys_privs
ORDER BY privilege;
Result:
Privilege````````````Admin_Option
~~~~~~ ~~~~~~~~~
ALTER SESSION`````No
CREATE SESSION````No
CREATE SYNONYM```No -
Privilege to view Package DDL only
Hello Friends,
I need your help on GRANTS.
Oracle version: Oracle 11G R2
OS: AIX
I have three users in a database. Among these three users, two users, say USR1 and USER2 are having all database objects which is needed for my application and poses all system privileges equivalent to a DBA role.
The 3rd one I have created is a READ user. I want this user to view only source code of PACKAGES AND PACKAGES BODY objects of only USR1, not USR2. Also, I have more than thousand packages/package bodies in USR1. READ should not be able to CREATE or compile a procedure, just simply be able to view the source code.
FYI, GRANT EXECUTE enables me to see PACKAGE specific only, not PACKAGE BODY.
Which privilege should I grant to READ user to achieve this security?
Please help.AshishGautam wrote:
Hello Friends,
I need your help on GRANTS.
Oracle version: Oracle 11G R2
OS: AIX
I have three users in a database. Among these three users, two users, say USR1 and USER2 are having all database objects which is needed for my application and poses all system privileges equivalent to a DBA role.
The 3rd one I have created is a READ user. I want this user to view only source code of PACKAGES AND PACKAGES BODY objects of only USR1, not USR2. Also, I have more than thousand packages/package bodies in USR1. READ should not be able to CREATE or compile a procedure, just simply be able to view the source code.
FYI, GRANT EXECUTE enables me to see PACKAGE specific only, not PACKAGE BODY.
Which privilege should I grant to READ user to achieve this security?
Please help.CREATE OR REPLACE PROCEDURE READ_MY_SOURCE ...
-- which SELECT TEXT FROM USER_SOURCE ORDER BY LINE
have this procedure owned be both USR1 & USER2
GRANT EXECUTE ON USR1.READ_MY_SOURCE TO READ;
GRANT EXECUTE ON USR2.READ_MY_SOURCE TO READ; -
Can't see package body in SQL Developer version 2.1.1.64
When I go to the object browser, I can see all of the package specs but can't seem to get to the package body. I can access the package body just fine through Toad, so I don't think it is an Oracle user issue. Help?
I can see any user's Package Body when I'm logged into the database as a DBA, so it must be some privilege that you need. The privilege I would have guessed you need is SELECT ANY DICTIONARY but you say you have that privilege. If you were granted that privilege through a role, make sure that the role is active, or that it is a default role.
Another role it might be looking for is EXECUTE ANY PROCEDURE, but I'm not sure. See if you can do these selects, since these are probably the views that SQL Developer is using:
select * from dba_objects where owner = 'some owner' and object_type = 'PACKAGE BODY';
select * from dba_source where owner = ' some owner' and type = 'PACKAGE BODY';Of course, if your database administrator is willing to grant you the DBA role, that ought to do the trick - works for me. Otherwise, you and your DBA may have to try different system privileges until you find the one that works. -
VIew of Package body in another schema in EA 3.0
I would like the ability in SQL Developer to view the package body of another schema with the CREATE ANY PRIVILGE.
For instance, in TOAD you can grant access to DBA_SOURCE or SELECT_CATALOG_ROLE and then be able to view another schema's package body.
This is long overdue without having to log into that schema or granting CREATE ANY PRIVILEDGE to user.
This one is really needed"CREATE ANY PRIVILEGE" is irrelevant to the ability of viewing the source owned by other users.
Please provide exact script for creating a user, which is able to see the code, say in HR schema, via the query
select * from all_source
where owner = 'HR'
and yet missing the nodes in the OtherUsers->Packages->PKG_A->PKG_A Body in the navigator. -
SQL developer 3.1 in schema browser doesn't show package body
Hi,
When i search a package with schema browser, i can't see the package body of other owner, the menu "edit body" is disabled.
My user as select any dictionary et select_catalog_role
When i connect with a DBA's user, i can see all.
I'am on windows with sqldev 3.1
ThanksHi erifet,
This one seems to go back and forth. It was originally fixed in Schema Browser for 3.0. The "Edit Body" was greyed out, but an "Open Body" icon in the code editor toolbar for Package Spec was enabled. Here is the forum reference:
30EA1 package bodies missing in schema browser still not fixed
In 3.1, both "Edit Body" and "Open Body" are greyed out, and that applies both to Schema Browser and Connection Navigator for Other Users packages, so at least 3.1 is consistent. The difference between the Browser and the Navigator is Schema Browser has no option to display a Package Body type (must go through Package Spec type), while the Connection Navigator displays a Package Body node type in the tree beneath the Spec node. In the forum thread AM references, Vadim explains what 3.1 does: it uses the ALL_OBJECTS view, which apparently does not include package bodies. Off-hand I'm not sure why it does not include them, and the following link doesn't shed any light:
http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1001.htm
Adding the execute privilege on the package does not help either. At least you have the workaround of using the Connection navigator to view the package body metadata (code) of Other Users if you have been granted either SELECT_CATALOG_ROLE or SELECT ANY DICTIONARY. As for returning to the 3.0 Schema Browser behavior, perhaps Vadim will notice your post and have some explanation as to why or why not that may be possible.
Regards,
Gary
SQL Developer Team -
Access package body in once schema by another
I have package defined in one schema (A). How can another user (B) access the body of that package logged in as B?
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> connect o/o
Connecte.
SQL> create or replace package p is procedure p; end;
2 /
Package cree.
SQL> create or replace package body p is procedure p is begin null;end; end;
2 /
Corps de package cree.
SQL> grant execute on p to u;
Autorisation de privileges (GRANT) acceptee.
SQL> connect u/u
Connecte.
SQL> select * from all_source where owner='O';
OWNER NAME TYPE
LINE
TEXT
O P PACKAGE
1
package p is procedure p; end;
O P PACKAGE BODY
1
package body p is procedure p is begin null;end; end;
OWNER NAME TYPE
LINE
TEXT
SQL> -
Unable to see package body in all_source
schema owner can see package and package body in all_source
another user, which has execute any procedure privs can only see the package, not the package body in all_source
Is there another privilege necessary to see the package body? I can't find any.
thanks, ...jrbIs your package valid? OWB will not show invalid packages in the project tree. Go to the database schema and check if the package is valid. If the package is invalid, recompile and reimport it into OWB.
-
How to compile HTMLDB_SITE_ADMIN_PRIVS invalid package body?
Hi,
I am trying to grant HTMLDB Administrator privilege to assign the other Oracle default schemas to workspaces by executing the following procedure.
SQL> EXEC HTMLDB_SITE_ADMIN_PRIVS.UNRESTRICT_SCHEMA(p_schema => 'SYSTEM');
However, the package body is corrupted. As the package body is wrapped, I cannot compile it manually.
FLOWS_020000@PROD> ALTER PACKAGE HTMLDB_SITE_ADMIN_PRIVS COMPILE BODY;
Warning: Package Body altered with compilation errors.
FLOWS_020000@pPROD> SHOW ERRORS;
Errors for PACKAGE BODY HTMLDB_SITE_ADMIN_PRIVS:
LINE/COL ERROR
0/0 PLS-00753: malformed or corrupted wrapped unit
I'd greatly appreciate if you can provide any suggestion or advice for me to compile or reload this wrapped package body.
Thanks,
DeborahHi,
I am trying to grant HTMLDB Administrator privilege to assign the other Oracle default schemas to workspaces by executing the following procedure.
SQL> EXEC HTMLDB_SITE_ADMIN_PRIVS.UNRESTRICT_SCHEMA(p_schema => 'SYSTEM');
However, the package body is corrupted. As the package body is wrapped, I cannot compile it manually.
FLOWS_020000@PROD> ALTER PACKAGE HTMLDB_SITE_ADMIN_PRIVS COMPILE BODY;
Warning: Package Body altered with compilation errors.
FLOWS_020000@pPROD> SHOW ERRORS;
Errors for PACKAGE BODY HTMLDB_SITE_ADMIN_PRIVS:
LINE/COL ERROR
0/0 PLS-00753: malformed or corrupted wrapped unit
I'd greatly appreciate if you can provide any suggestion or advice for me to compile or reload this wrapped package body.
Thanks,
Deborah -
3.1EA2 bug still not fixed - Members of package body not listed in the tree
Hi, I was working today with SQL Developer again and found that this bug is still not fixed even when it was reported more than 1 year ago!!!
I did a quick search and found it here
Package Body Tree not always showing
The problem is when you expand the package specification or package body tree, not all members of the specification/body are listed. This is mostly observable in the package body, but it regards to the specification as well.
Consider this case:
CREATE TABLE EMP (
ID NUMBER(6,0) DEFAULT 0,
NAME VARCHAR2(20 BYTE) DEFAULT NULL,
DEPT VARCHAR2(20 BYTE) DEFAULT NULL,
FUNCTION VARCHAR2(20 BYTE),
PROCEDURE VARCHAR2(20 BYTE));
CREATE TABLE LOOP (
AREA VARCHAR2(5),
VALUE VARCHAR2(2));
CREATE OR REPLACE PACKAGE Test_Package1 AS
gvc_const CONSTANT VARCHAR2(10) := 'xxx';
PROCEDURE Test(p_RC OUT NUMBER,
p_ID IN NUMBER);
END Test_Package1;
CREATE OR REPLACE PACKAGE BODY Test_Package1 AS
PROCEDURE Test(p_RC OUT NUMBER,
p_ID IN NUMBER)
IS
BEGIN
--INSERT INTO EMP (ID, NAME, DEPT, PROCEDURE) VALUES (1, 'Tina', 'xxx', 'xxx');
--INSERT INTO EMP (ID, NAME, DEPT, FUNCTION) VALUES (2, 'Jeff', 'xxx', 'xxx');
--INSERT INTO LOOP(AREA, VALUE) VALUES('a','b');
NULL;
END;
END Test_Package1;Compile the package specification and the body. Expand the spec + body in the tree. Uncomment any of the commented lines in the package body and compile the body again. Now expand the package body again and look what is displayed.
Why? It is because SQL Developer handles words "Function", "Procedure" and "Loop" as keywords and according to them does the parsing.
Another case
CREATE OR REPLACE PACKAGE Test_Package1 AS
gvc_const CONSTANT VARCHAR2(10) := 'xxx';
TYPE Loop_rec IS RECORD(
item1 LOOP.AREA%TYPE);
PROCEDURE Test(p_RC OUT NUMBER,
p_ID IN NUMBER);
END Test_Package1;Compile just this specification and try to expand it in the tree. Again, during parsing the package, SQL Developer takes the word "LOOP" into consideration and fails to parse the specification.
There is exactly the same problem when you declare functions from external dll libraries in package body. Since there is no "END;" in this case, SQL Developer's parser fails...
To me it seems you simply blindly took some keywords like "FUNCTION" and expect there will be some "END;" keyword corresponding with it.
Can anyone have a look at this and finally fix it?Hi,
Thanks for trying out SQL Developer 3.1 EA2 and providing a clear, reproducible test case for this issue. I logged an internal bug for it:
Bug 13438696 - 3.1EA2: FORUM: CERTAIN KEYWORDS IN PKG BODY BLOCK MEMBERS FROM CONN VIEW TREE
It seems the bug noted in the other forum thread you reference has been fixed, but really had nothing to do with problems discussed either here or there. That fix involved adding an Edit Body... item to the Package context menu in the Schema Browser, not displaying Package members correctly in the Connection view tree.
Regards,
Gary
SQL Developer Team -
How to open a package body in Oracle sql developer
How to open a package body in Oracle sql developer..any shortcut for that
I need another way to get to my package body. I'm on a locked down system, so the only way I can reference anything is if I already know the name of it. I accidentally overwrote my text document that I was using to work on it and I closed out of the package body in sqldeveloper. There must be a command, like an alter or some such. Anyone know the old fashioned way of looking at a package?
-
Hi all,
I am new to PL/SQL. I am getting the following errors during the runtime. Please help
OWNER: BANINST1 NAME: GOKINTL TYPE: PACKAGE BODY
LINE/COL ERROR
115/14 PLS-00323: subprogram or cursor 'P_GOBINTL_INSERT' is declared in
a package specification and must be defined in the package body
147/14 PLS-00323: subprogram or cursor 'P_GORDOCM_INSERT' is declared in
a package specification and must be defined in the package body
167/14 PLS-00323: subprogram or cursor 'P_GOBINTL_UPDATE_ROW' is
declared in a package specification and must be defined in the
package body
183/9 PL/SQL: SQL Statement ignored
183/9 PLS-00394: wrong number of values in the INTO list of a FETCH
statement
199/14 PLS-00323: subprogram or cursor 'P_GORDOCM_UPDATE_ROW' is
declared in a package specification and must be defined in the
package body
6 rows selected.
PL/SQL code:
/* Functions to determine whether international student */
/* or not. */
FUNCTION f_check_gobintl_exists
( pidm IN GOBINTL.GOBINTL_PIDM%TYPE)
RETURN VARCHAR2 IS
status VARCHAR2(1) := '';
chk_gobintl_tab VARCHAR2(1) := '';
CURSOR GOBINTL_C
IS
SELECT 'Y'
FROM GOBINTL
WHERE GOBINTL_PIDM = pidm;
BEGIN
OPEN GOBINTL_C;
FETCH GOBINTL_C INTO chk_gobintl_tab;
IF GOBINTL_C%NOTFOUND THEN
status := 'N';
ELSE
status := 'Y';
END IF;
CLOSE GOBINTL_C;
RETURN status;
END f_check_gobintl_exists;
/* Function to determine whether the student is a */
/* non-resident alien or not. */
FUNCTION f_check_nonresident_status(
pidm IN GORVISA.GORVISA_PIDM%TYPE,
input_date IN GORVISA.GORVISA_VISA_START_DATE%TYPE)
RETURN VARCHAR2
IS
status VARCHAR2(1) := '';
chk_non_resi_status VARCHAR2(1) := '';
CURSOR CHK_NONRESI_STATUS_C
IS
SELECT 'Y'
FROM GORVISA,
STVVTYP
WHERE STVVTYP_NON_RES_IND = 'Y'
AND GORVISA_VTYP_CODE = STVVTYP_CODE
AND GORVISA_PIDM = pidm
AND GORVISA_VISA_START_DATE <= TRUNC(input_date)
AND GORVISA_VISA_EXPIRE_DATE >= TRUNC(input_date);
BEGIN
OPEN CHK_NONRESI_STATUS_C;
FETCH CHK_NONRESI_STATUS_C INTO chk_non_resi_status;
IF CHK_NONRESI_STATUS_C%NOTFOUND THEN
status := 'N';
ELSE
status := 'Y';
END IF;
CLOSE CHK_NONRESI_STATUS_C;
RETURN status;
END f_check_nonresident_status;
/* Function to select a single row from gobintl table. */
FUNCTION f_gobintl_select
( pidm GOBINTL.GOBINTL_PIDM%TYPE)
RETURN GOBINTL%ROWTYPE
IS
gobintl_row GOBINTL%ROWTYPE;
CURSOR GOBINTL_C
IS
SELECT GOBINTL_PIDM,
GOBINTL_SPOUSE_IND,
GOBINTL_SIGNATURE_IND,
GOBINTL_USER_ID,
GOBINTL_ACTIVITY_DATE,
GOBINTL_PASSPORT_ID,
GOBINTL_NATN_CODE_ISSUE,
GOBINTL_PASSPORT_EXP_DATE,
GOBINTL_I94_STATUS ,
GOBINTL_I94_DATE,
GOBINTL_REG_NUMBER,
GOBINTL_DURATION,
GOBINTL_CELG_CODE,
GOBINTL_CERT_NUMBER ,
GOBINTL_CERT_DATE_ISSUE,
GOBINTL_CERT_DATE_RECEIPT,
GOBINTL_ADMR_CODE,
GOBINTL_NATN_CODE_BIRTH,
GOBINTL_NATN_CODE_LEGAL,
GOBINTL_LANG_CODE,
GOBINTL_SPON_CODE,
GOBINTL_EMPT_CODE,
GOBINTL_FOREIGN_SSN,
GOBINTL_CHILD_NUMBER,
GOBINTL_VPDI_CODE
FROM GOBINTL
WHERE GOBINTL_PIDM = pidm;
BEGIN
OPEN GOBINTL_C;
FETCH GOBINTL_C INTO gobintl_row;
CLOSE GOBINTL_C;
RETURN gobintl_row;
END f_gobintl_select;
/* Function to select a single row from gordocm table. */
FUNCTION f_gordocm_select
( pidm IN GORDOCM.GORDOCM_PIDM%TYPE,
seq_no IN GORDOCM.GORDOCM_SEQ_NO%TYPE,
vtyp_code IN GORDOCM.GORDOCM_VTYP_CODE%TYPE,
visa_number IN GORDOCM.GORDOCM_VISA_NUMBER%TYPE,
docm_code IN GORDOCM.GORDOCM_DOCM_CODE%TYPE)
RETURN GORDOCM%ROWTYPE
IS
gordocm_row GORDOCM%ROWTYPE;
CURSOR GORDOCM_C
IS
SELECT GORDOCM_PIDM ,
GORDOCM_SEQ_NO ,
GORDOCM_VTYP_CODE,
GORDOCM_VISA_NUMBER,
GORDOCM_DOCM_CODE,
GORDOCM_DISPOSITION ,
GORDOCM_USER_ID ,
GORDOCM_ACTIVITY_DATE ,
GORDOCM_SRCE_CODE ,
GORDOCM_REQUEST_DATE ,
GORDOCM_RECEIVED_DATE
FROM GORDOCM
WHERE GORDOCM_PIDM = pidm
AND GORDOCM_SEQ_NO = seq_no
AND GORDOCM_VTYP_CODE = vtyp_code
AND GORDOCM_VISA_NUMBER = visa_number
AND GORDOCM_DOCM_CODE = docm_code;
BEGIN
OPEN GORDOCM_C;
FETCH GORDOCM_C into gordocm_row;
CLOSE GORDOCM_C;
RETURN gordocm_row;
END f_gordocm_select;
/* Function to select the row id of the row for the */
/* given pidm from gobintl. */
FUNCTION f_get_gobintl_rowid
(pidm IN GOBINTL.GOBINTL_PIDM%TYPE )
RETURN ROWID
AS
gobintl_rowid rowid := null;
CURSOR get_gobintl is
SELECT rowid
FROM gobintl
WHERE gobintl_pidm = pidm;
BEGIN
OPEN get_gobintl;
FETCH get_gobintl INTO gobintl_rowid;
CLOSE get_gobintl;
RETURN gobintl_rowid;
END f_get_gobintl_rowid;
/* Function to select the row id of the row for the */
/* given pidm from gorvisa. */
FUNCTION f_get_gorvisa_rowid
(pidm IN GORVISA.GORVISA_PIDM%TYPE )
RETURN ROWID
AS
gorvisa_rowid rowid := null;
CURSOR get_gorvisa IS
SELECT rowid
FROM gorvisa
WHERE gorvisa_pidm = pidm
ORDER BY gorvisa_seq_no desc;
BEGIN
OPEN get_gorvisa;
FETCH get_gorvisa INTO gorvisa_rowid;
CLOSE get_gorvisa;
RETURN gorvisa_rowid;
END f_get_gorvisa_rowid;
-- new functions for OA to return visa and international data
FUNCTION f_gorvisa_value
(p_pidm IN SPRIDEN.SPRIDEN_PIDM%TYPE ,
p_return_value VARCHAR2)
RETURN VARCHAR2 IS
CURSOR get_gorvisa
IS
SELECT *
FROM gorvisa
WHERE gorvisa_pidm = p_pidm
ORDER BY gorvisa_seq_no DESC;
gorvisa_var NUMBER := 0;
BEGIN
IF gv_gorvisa_row.gorvisa_pidm is NULL or
gv_gorvisa_row.gorvisa_pidm <> p_pidm then
OPEN get_gorvisa;
FETCH get_gorvisa INTO gv_gorvisa_row;
IF get_gorvisa%NOTFOUND THEN
gorvisa_var :=1;
END IF;
CLOSE get_gorvisa;
end if;
IF gorvisa_var = 0 THEN
CASE p_return_value
WHEN 'N' THEN
RETURN gv_gorvisa_row.gorvisa_visa_number;
WHEN 'C' THEN
RETURN gv_gorvisa_row.gorvisa_vtyp_code;
ELSE
RETURN ' ';
END CASE;
END IF;
RETURN NULL;
END f_gorvisa_value;
FUNCTION f_gobintl_value
(p_pidm IN SPRIDEN.SPRIDEN_PIDM%TYPE ,
p_return_value VARCHAR2)
RETURN VARCHAR2 IS
CURSOR get_gobintl
IS
SELECT *
FROM gobintl
WHERE gobintl_pidm = p_pidm;
gobintl_var NUMBER := 0;
BEGIN
IF gv_gobintl_row.gobintl_pidm is NULL or
gv_gobintl_row.gobintl_pidm <> p_pidm then
OPEN get_gobintl;
FETCH get_gobintl INTO gv_gobintl_row;
IF get_gobintl%NOTFOUND THEN
gobintl_var := 1;
END IF;
CLOSE get_gobintl;
end if;
IF gobintl_var = 0 THEN
CASE p_return_value
WHEN 'B' THEN
RETURN gv_gobintl_row.gobintl_natn_code_birth;
WHEN 'L' THEN
RETURN gv_gobintl_row.gobintl_natn_code_legal;
ELSE
RETURN ' ';
END CASE;
END IF;
RETURN NULL;
END f_gobintl_value;
/* Procedure to insert a row into gobintl table. */
PROCEDURE p_gobintl_insert
( pidm IN GOBINTL.GOBINTL_PIDM%TYPE,
spouse_ind IN GOBINTL.GOBINTL_SPOUSE_IND%TYPE,
signature_ind IN GOBINTL.GOBINTL_SIGNATURE_IND%TYPE,
user_id IN GOBINTL.GOBINTL_USER_ID%TYPE,
activity_date IN GOBINTL.GOBINTL_ACTIVITY_DATE%TYPE,
passport_id IN GOBINTL.GOBINTL_PASSPORT_ID%TYPE,
natn_code_issue IN GOBINTL.GOBINTL_NATN_CODE_ISSUE%TYPE,
passport_exp_date IN GOBINTL.GOBINTL_PASSPORT_EXP_DATE%TYPE,
i94_status IN GOBINTL.GOBINTL_I94_STATUS%TYPE,
i94_date IN GOBINTL.GOBINTL_I94_DATE%TYPE,
reg_number IN GOBINTL.GOBINTL_REG_NUMBER%TYPE,
duration IN GOBINTL.GOBINTL_DURATION%TYPE,
celg_code IN GOBINTL.GOBINTL_CELG_CODE%TYPE,
cert_number IN GOBINTL.GOBINTL_CERT_NUMBER%TYPE,
cert_date_issue IN GOBINTL.GOBINTL_CERT_DATE_ISSUE%TYPE,
cert_date_receipt IN GOBINTL.GOBINTL_CERT_DATE_RECEIPT%TYPE,
admr_code IN GOBINTL.GOBINTL_ADMR_CODE%TYPE,
natn_code_birth IN GOBINTL.GOBINTL_NATN_CODE_BIRTH%TYPE,
natn_code_legal IN GOBINTL.GOBINTL_NATN_CODE_LEGAL%TYPE,
lang_code IN GOBINTL.GOBINTL_LANG_CODE%TYPE,
spon_code IN GOBINTL.GOBINTL_SPON_CODE%TYPE,
empt_code IN GOBINTL.GOBINTL_EMPT_CODE%TYPE,
foreign_ssn IN GOBINTL.GOBINTL_FOREIGN_SSN%TYPE,
child_number IN GOBINTL.GOBINTL_CHILD_NUMBER%TYPE,
vpdi IN GOBINTL.GOBINTL_VPDI_CODE%TYPE
IS
BEGIN
INSERT INTO GOBINTL
( GOBINTL_PIDM,
GOBINTL_SPOUSE_IND,
GOBINTL_SIGNATURE_IND,
GOBINTL_USER_ID,
GOBINTL_ACTIVITY_DATE,
GOBINTL_PASSPORT_ID,
GOBINTL_NATN_CODE_ISSUE,
GOBINTL_PASSPORT_EXP_DATE,
GOBINTL_I94_STATUS,
GOBINTL_I94_DATE,
GOBINTL_REG_NUMBER,
GOBINTL_DURATION,
GOBINTL_CELG_CODE,
GOBINTL_CERT_NUMBER,
GOBINTL_CERT_DATE_ISSUE,
GOBINTL_CERT_DATE_RECEIPT,
GOBINTL_ADMR_CODE,
GOBINTL_NATN_CODE_BIRTH,
GOBINTL_NATN_CODE_LEGAL,
GOBINTL_LANG_CODE,
GOBINTL_SPON_CODE,
GOBINTL_EMPT_CODE,
GOBINTL_FOREIGN_SSN,
GOBINTL_CHILD_NUMBER,
GOBINTL_VPDI_CODE
VALUES
( pidm,
NVL(spouse_ind,'T'),
NVL(signature_ind,'T'),
user_id,
activity_date,
passport_id,
natn_code_issue,
passport_exp_date,
i94_status,
i94_date,
reg_number,
duration,
celg_code,
cert_number,
cert_date_issue,
cert_date_receipt,
admr_code,
natn_code_birth,
natn_code_legal,
lang_code,
spon_code,
empt_code,
foreign_ssn,
child_number,
'SV'
END p_gobintl_insert;
/* Procedure to insert a row into gordocm table. */
PROCEDURE p_gordocm_insert
pidm IN GORDOCM.GORDOCM_PIDM%TYPE,
seq_no IN GORDOCM.GORDOCM_SEQ_NO%TYPE,
vtyp_code IN GORDOCM.GORDOCM_VTYP_CODE%TYPE,
visa_number IN GORDOCM.GORDOCM_VISA_NUMBER%TYPE,
docm_code IN GORDOCM.GORDOCM_DOCM_CODE%TYPE,
disposition IN GORDOCM.GORDOCM_DISPOSITION%TYPE,
user_id IN GORDOCM.GORDOCM_USER_ID%TYPE,
activity_date IN GORDOCM.GORDOCM_ACTIVITY_DATE%TYPE,
srce_code IN GORDOCM.GORDOCM_SRCE_CODE%TYPE,
request_date IN GORDOCM.GORDOCM_REQUEST_DATE%TYPE,
received_date IN GORDOCM.GORDOCM_RECEIVED_DATE%TYPE,
vpdi_gordocm IN GORDOCM.GORDOCM_VPDI_CODE%TYPE
IS
BEGIN
INSERT INTO GORDOCM
( GORDOCM_PIDM,
GORDOCM_SEQ_NO,
GORDOCM_VTYP_CODE,
GORDOCM_VISA_NUMBER,
GORDOCM_DOCM_CODE,
GORDOCM_DISPOSITION,
GORDOCM_USER_ID,
GORDOCM_ACTIVITY_DATE,
GORDOCM_SRCE_CODE,
GORDOCM_REQUEST_DATE,
GORDOCM_RECEIVED_DATE,
GORDOCM_VPDI_CODE
VALUES
( pidm,
seq_no,
vtyp_code,
visa_number,
docm_code,
disposition,
user_id,
activity_date,
srce_code,
request_date,
received_date,
'SV'
END p_gordocm_insert;
/* Procedure to update a row in gobintl table. */
PROCEDURE p_gobintl_update_row
( pidm IN GOBINTL.GOBINTL_PIDM%TYPE,
spouse_ind IN GOBINTL.GOBINTL_SPOUSE_IND%TYPE,
signature_ind IN GOBINTL.GOBINTL_SIGNATURE_IND%TYPE,
user_id IN GOBINTL.GOBINTL_USER_ID%TYPE,
activity_date IN GOBINTL.GOBINTL_ACTIVITY_DATE%TYPE,
passport_id IN GOBINTL.GOBINTL_PASSPORT_ID%TYPE,
natn_code_issue IN GOBINTL.GOBINTL_NATN_CODE_ISSUE%TYPE,
passport_exp_date IN GOBINTL.GOBINTL_PASSPORT_EXP_DATE%TYPE,
i94_status IN GOBINTL.GOBINTL_I94_STATUS%TYPE,
i94_date IN GOBINTL.GOBINTL_I94_DATE%TYPE,
reg_number IN GOBINTL.GOBINTL_REG_NUMBER%TYPE,
duration IN GOBINTL.GOBINTL_DURATION%TYPE,
celg_code IN GOBINTL.GOBINTL_CELG_CODE%TYPE,
cert_number IN GOBINTL.GOBINTL_CERT_NUMBER%TYPE,
cert_date_issue IN GOBINTL.GOBINTL_CERT_DATE_ISSUE%TYPE,
cert_date_receipt IN GOBINTL.GOBINTL_CERT_DATE_RECEIPT%TYPE,
admr_code IN GOBINTL.GOBINTL_ADMR_CODE%TYPE,
natn_code_birth IN GOBINTL.GOBINTL_NATN_CODE_BIRTH%TYPE,
natn_code_legal IN GOBINTL.GOBINTL_NATN_CODE_LEGAL%TYPE,
lang_code IN GOBINTL.GOBINTL_LANG_CODE%TYPE,
spon_code IN GOBINTL.GOBINTL_SPON_CODE%TYPE,
empt_code IN GOBINTL.GOBINTL_EMPT_CODE%TYPE,
foreign_ssn IN GOBINTL.GOBINTL_FOREIGN_SSN%TYPE,
child_number IN GOBINTL.GOBINTL_CHILD_NUMBER%TYPE,
vpdi IN GOBINTL.GOBINTL_VPDI_CODE%TYPE
IS
BEGIN
UPDATE GOBINTL
SET GOBINTL_SPOUSE_IND = spouse_ind,
GOBINTL_SIGNATURE_IND = signature_ind,
GOBINTL_USER_ID = user_id,
GOBINTL_ACTIVITY_DATE = activity_date,
GOBINTL_PASSPORT_ID = passport_id,
GOBINTL_NATN_CODE_ISSUE = natn_code_issue,
GOBINTL_PASSPORT_EXP_DATE = passport_exp_date,
GOBINTL_I94_STATUS = i94_status,
GOBINTL_I94_DATE = i94_date,
GOBINTL_REG_NUMBER = reg_number,
GOBINTL_DURATION = duration,
GOBINTL_CELG_CODE = celg_code,
GOBINTL_CERT_NUMBER = cert_number,
GOBINTL_CERT_DATE_ISSUE = cert_date_issue,
GOBINTL_CERT_DATE_RECEIPT = cert_date_receipt,
GOBINTL_ADMR_CODE = admr_code,
GOBINTL_NATN_CODE_BIRTH = natn_code_birth,
GOBINTL_NATN_CODE_LEGAL = natn_code_legal,
GOBINTL_LANG_CODE = lang_code,
GOBINTL_SPON_CODE = spon_code,
GOBINTL_EMPT_CODE = empt_code,
GOBINTL_FOREIGN_SSN = foreign_ssn,
GOBINTL_CHILD_NUMBER = child_number,
GOBINTL_VPDI_CODE = 'SV'
WHERE GOBINTL_PIDM = pidm;
END p_gobintl_update_row;
/* Procedure to update a row in gordocm table. */
PROCEDURE p_gordocm_update_row
pidm IN GORDOCM.GORDOCM_PIDM%TYPE,
seq_no IN GORDOCM.GORDOCM_SEQ_NO%TYPE,
vtyp_code IN GORDOCM.GORDOCM_VTYP_CODE%TYPE,
visa_number IN GORDOCM.GORDOCM_VISA_NUMBER%TYPE,
docm_code IN GORDOCM.GORDOCM_DOCM_CODE%TYPE,
disposition IN GORDOCM.GORDOCM_DISPOSITION%TYPE,
user_id IN GORDOCM.GORDOCM_USER_ID%TYPE,
activity_date IN GORDOCM.GORDOCM_ACTIVITY_DATE%TYPE,
srce_code IN GORDOCM.GORDOCM_SRCE_CODE%TYPE,
request_date IN GORDOCM.GORDOCM_REQUEST_DATE%TYPE,
received_date IN GORDOCM.GORDOCM_RECEIVED_DATE%TYPE,
vpdi_gordocm IN GORDOCM.GORDOCM_VPDI_CODE%TYPE
IS
BEGIN
UPDATE GORDOCM
SET GORDOCM_DISPOSITION = disposition,
GORDOCM_USER_ID = user_id,
GORDOCM_ACTIVITY_DATE = activity_date,
GORDOCM_SRCE_CODE = srce_code,
GORDOCM_REQUEST_DATE = request_date,
GORDOCM_RECEIVED_DATE = received_date,
GORDOCM_VPDI_CODE = vpdi_gordocm
WHERE GORDOCM_PIDM = pidm
AND GORDOCM_SEQ_NO = seq_no
AND GORDOCM_VTYP_CODE = vtyp_code
AND GORDOCM_VISA_NUMBER = visa_number
AND GORDOCM_DOCM_CODE = docm_code;
END p_gordocm_update_row;
/* Procedure to delete a row from gobintl table. */
PROCEDURE p_gobintl_delete_row
pidm IN GOBINTL.GOBINTL_PIDM%TYPE
IS
BEGIN
DELETE
FROM GOBINTL
WHERE GOBINTL_PIDM = pidm;
END p_gobintl_delete_row;
/* Procedure to delete a row from gordocm table. */
PROCEDURE p_gordocm_delete_row
pidm IN GORDOCM.GORDOCM_PIDM%TYPE,
seq_no IN GORDOCM.GORDOCM_SEQ_NO%TYPE,
vtyp_code IN GORDOCM.GORDOCM_VTYP_CODE%TYPE,
visa_number IN GORDOCM.GORDOCM_VISA_NUMBER%TYPE,
docm_code IN GORDOCM.GORDOCM_DOCM_CODE%TYPE
IS
BEGIN
DELETE
FROM GORDOCM
WHERE GORDOCM_PIDM = pidm
AND GORDOCM_SEQ_NO = seq_no
AND GORDOCM_VTYP_CODE = vtyp_code
AND GORDOCM_VISA_NUMBER = visa_number
AND GORDOCM_DOCM_CODE = docm_code;
END p_gordocm_delete_row;
END GOKINTL;
/Hello,
Create a package specifiction see following example and add just defintions or all the function and procedure
CREATE OR REPLACE PACKAGE gokintl
AS
PROCEDURE item_logging;
FUNCTION get_sys_parms (i_parameter IN VARCHAR2)
RETURN VARCHAR2;
END gokintl;
/Then package body, I have comment FIX THIS SOMETHING WRONG take a look and fix your logic
CREATE OR REPLACE PACKAGE BODY gokintl
AS
FUNCTION f_check_gobintl_exists (pidm IN gobintl.gobintl_pidm%TYPE)
RETURN VARCHAR2
IS
status VARCHAR2 (1) := '';
chk_gobintl_tab VARCHAR2 (1) := '';
CURSOR gobintl_c
IS
SELECT 'Y'
FROM gobintl
WHERE gobintl_pidm = pidm;
BEGIN
OPEN gobintl_c;
FETCH gobintl_c INTO chk_gobintl_tab;
IF gobintl_c%NOTFOUND
THEN
status := 'N';
ELSE
status := 'Y';
END IF;
CLOSE gobintl_c;
RETURN status;
END f_check_gobintl_exists;
/* Function to determine whether the student is a */
/* non-resident alien or not. */
FUNCTION f_check_nonresident_status (pidm IN gorvisa.gorvisa_pidm%TYPE,
input_date IN gorvisa.gorvisa_visa_start_date%TYPE
RETURN VARCHAR2
IS
status VARCHAR2 (1) := '';
chk_non_resi_status VARCHAR2 (1) := '';
CURSOR chk_nonresi_status_c
IS
SELECT 'Y'
FROM gorvisa, stvvtyp
WHERE stvvtyp_non_res_ind = 'Y'
AND gorvisa_vtyp_code = stvvtyp_code
AND gorvisa_pidm = pidm
AND gorvisa_visa_start_date <= TRUNC (input_date)
AND gorvisa_visa_expire_date >= TRUNC (input_date);
BEGIN
OPEN chk_nonresi_status_c;
FETCH chk_nonresi_status_c INTO chk_non_resi_status;
IF chk_nonresi_status_c%NOTFOUND
THEN
status := 'N';
ELSE
status := 'Y';
END IF;
CLOSE chk_nonresi_status_c;
RETURN status;
END f_check_nonresident_status;
/* Function to select a single row from gobintl table. */
FUNCTION f_gobintl_select (pidm gobintl.gobintl_pidm%TYPE)
RETURN gobintl%ROWTYPE
IS
gobintl_row gobintl%ROWTYPE;
CURSOR gobintl_c
IS
SELECT gobintl_pidm,
gobintl_spouse_ind,
gobintl_signature_ind,
gobintl_user_id,
gobintl_activity_date,
gobintl_passport_id,
gobintl_natn_code_issue,
gobintl_passport_exp_date,
gobintl_i94_status,
gobintl_i94_date,
gobintl_reg_number,
gobintl_duration,
gobintl_celg_code,
gobintl_cert_number,
gobintl_cert_date_issue,
gobintl_cert_date_receipt,
gobintl_admr_code,
gobintl_natn_code_birth,
gobintl_natn_code_legal,
gobintl_lang_code,
gobintl_spon_code,
gobintl_empt_code,
gobintl_foreign_ssn,
gobintl_child_number,
gobintl_vpdi_code
FROM gobintl
WHERE gobintl_pidm = pidm;
BEGIN
OPEN gobintl_c;
FETCH gobintl_c INTO gobintl_row;
CLOSE gobintl_c;
RETURN gobintl_row;
END f_gobintl_select;
/* Function to select a single row from gordocm table. */
FUNCTION f_gordocm_select (pidm IN gordocm.gordocm_pidm%TYPE,
seq_no IN gordocm.gordocm_seq_no%TYPE,
vtyp_code IN gordocm.gordocm_vtyp_code%TYPE,
visa_number IN gordocm.gordocm_visa_number%TYPE,
docm_code IN gordocm.gordocm_docm_code%TYPE
RETURN gordocm%ROWTYPE
IS
gordocm_row gordocm%ROWTYPE;
CURSOR gordocm_c
IS
SELECT gordocm_pidm,
gordocm_seq_no,
gordocm_vtyp_code,
gordocm_visa_number,
gordocm_docm_code,
gordocm_disposition,
gordocm_user_id,
gordocm_activity_date,
gordocm_srce_code,
gordocm_request_date,
gordocm_received_date
FROM gordocm
WHERE gordocm_pidm = pidm
AND gordocm_seq_no = seq_no
AND gordocm_vtyp_code = vtyp_code
AND gordocm_visa_number = visa_number
AND gordocm_docm_code = docm_code;
BEGIN
OPEN gordocm_c;
FETCH gordocm_c INTO gordocm_row;
CLOSE gordocm_c;
RETURN gordocm_row;
END f_gordocm_select;
/* Function to select the row id of the row for the */
/* given pidm from gobintl. */
FUNCTION f_get_gobintl_rowid (pidm IN gobintl.gobintl_pidm%TYPE)
RETURN ROWID
AS
gobintl_rowid ROWID := NULL;
CURSOR get_gobintl
IS
SELECT ROWID
FROM gobintl
WHERE gobintl_pidm = pidm;
BEGIN
OPEN get_gobintl;
FETCH get_gobintl INTO gobintl_rowid;
CLOSE get_gobintl;
RETURN gobintl_rowid;
END f_get_gobintl_rowid;
/* Function to select the row id of the row for the */
/* given pidm from gorvisa. */
FUNCTION f_get_gorvisa_rowid (pidm IN gorvisa.gorvisa_pidm%TYPE)
RETURN ROWID
AS
gorvisa_rowid ROWID := NULL;
CURSOR get_gorvisa
IS
SELECT ROWID
FROM gorvisa
WHERE gorvisa_pidm = pidm
ORDER BY gorvisa_seq_no DESC;
BEGIN
OPEN get_gorvisa;
FETCH get_gorvisa INTO gorvisa_rowid;
CLOSE get_gorvisa;
RETURN gorvisa_rowid;
END f_get_gorvisa_rowid;
-- new functions for OA to return visa and international data
FUNCTION f_gorvisa_value (p_pidm IN spriden.spriden_pidm%TYPE,
p_return_value varchar2
RETURN VARCHAR2
IS
CURSOR get_gorvisa
IS
SELECT *
FROM gorvisa
WHERE gorvisa_pidm = p_pidm
ORDER BY gorvisa_seq_no DESC;
gorvisa_var NUMBER := 0;
BEGIN
IF (gv_gorvisa_row.gorvisa_pidm IS NULL
OR gv_gorvisa_row.gorvisa_pidm = p_pidm) --- FIX THIS SOMETHIGNG WRONG HERE
THEN
OPEN get_gorvisa;
FETCH get_gorvisa INTO gv_gorvisa_row;
IF get_gorvisa%NOTFOUND
THEN
gorvisa_var := 1;
END IF;
CLOSE get_gorvisa;
END IF;
IF gorvisa_var = 0
THEN
CASE p_return_value
WHEN 'N'
THEN
RETURN gv_gorvisa_row.gorvisa_visa_number;
WHEN 'C'
THEN
RETURN gv_gorvisa_row.gorvisa_vtyp_code;
ELSE
RETURN ' ';
END CASE;
END IF;
RETURN NULL;
END f_gorvisa_value;
FUNCTION f_gobintl_value (p_pidm IN spriden.spriden_pidm%TYPE,
p_return_value varchar2
RETURN VARCHAR2
IS
CURSOR get_gobintl
IS
SELECT *
FROM gobintl
WHERE gobintl_pidm = p_pidm;
gobintl_var NUMBER := 0;
BEGIN
IF gv_gobintl_row.gobintl_pidm IS NULL
OR gv_gobintl_row.gobintl_pidm = p_pidm -- FIX THIS SOMETHIGNG WRONG HERE
THEN
OPEN get_gobintl;
FETCH get_gobintl INTO gv_gobintl_row;
IF get_gobintl%NOTFOUND
THEN
gobintl_var := 1;
END IF;
CLOSE get_gobintl;
END IF;
IF gobintl_var = 0
THEN
CASE p_return_value
WHEN 'B'
THEN
RETURN gv_gobintl_row.gobintl_natn_code_birth;
WHEN 'L'
THEN
RETURN gv_gobintl_row.gobintl_natn_code_legal;
ELSE
RETURN ' ';
END CASE;
END IF;
RETURN NULL;
END f_gobintl_value;
/* Procedure to insert a row into gobintl table. */
PROCEDURE p_gobintl_insert (pidm IN gobintl.gobintl_pidm%TYPE,
spouse_ind IN gobintl.gobintl_spouse_ind%TYPE,
signature_ind IN gobintl.gobintl_signature_ind%TYPE,
user_id IN gobintl.gobintl_user_id%TYPE,
activity_date IN gobintl.gobintl_activity_date%TYPE,
passport_id IN gobintl.gobintl_passport_id%TYPE,
natn_code_issue IN gobintl.gobintl_natn_code_issue%TYPE,
passport_exp_date IN gobintl.gobintl_passport_exp_date%TYPE,
i94_status IN gobintl.gobintl_i94_status%TYPE,
i94_date IN gobintl.gobintl_i94_date%TYPE,
reg_number IN gobintl.gobintl_reg_number%TYPE,
duration IN gobintl.gobintl_duration%TYPE,
celg_code IN gobintl.gobintl_celg_code%TYPE,
cert_number IN gobintl.gobintl_cert_number%TYPE,
cert_date_issue IN gobintl.gobintl_cert_date_issue%TYPE,
cert_date_receipt IN gobintl.gobintl_cert_date_receipt%TYPE,
admr_code IN gobintl.gobintl_admr_code%TYPE,
natn_code_birth IN gobintl.gobintl_natn_code_birth%TYPE,
natn_code_legal IN gobintl.gobintl_natn_code_legal%TYPE,
lang_code IN gobintl.gobintl_lang_code%TYPE,
spon_code IN gobintl.gobintl_spon_code%TYPE,
empt_code IN gobintl.gobintl_empt_code%TYPE,
foreign_ssn IN gobintl.gobintl_foreign_ssn%TYPE,
child_number IN gobintl.gobintl_child_number%TYPE,
vpdi IN gobintl.gobintl_vpdi_code%TYPE
IS
BEGIN
INSERT INTO gobintl
gobintl_pidm,
gobintl_spouse_ind,
gobintl_signature_ind,
gobintl_user_id,
gobintl_activity_date,
gobintl_passport_id,
gobintl_natn_code_issue,
gobintl_passport_exp_date,
gobintl_i94_status,
gobintl_i94_date,
gobintl_reg_number,
gobintl_duration,
gobintl_celg_code,
gobintl_cert_number,
gobintl_cert_date_issue,
gobintl_cert_date_receipt,
gobintl_admr_code,
gobintl_natn_code_birth,
gobintl_natn_code_legal,
gobintl_lang_code,
gobintl_spon_code,
gobintl_empt_code,
gobintl_foreign_ssn,
gobintl_child_number,
gobintl_vpdi_code
VALUES (
pidm,
NVL (spouse_ind, 'T'),
NVL (signature_ind, 'T'),
user_id,
activity_date,
passport_id,
natn_code_issue,
passport_exp_date,
i94_status,
i94_date,
reg_number,
duration,
celg_code,
cert_number,
cert_date_issue,
cert_date_receipt,
admr_code,
natn_code_birth,
natn_code_legal,
lang_code,
spon_code,
empt_code,
foreign_ssn,
child_number,
'SV'
END p_gobintl_insert;
/* Procedure to insert a row into gordocm table. */
PROCEDURE p_gordocm_insert (pidm IN gordocm.gordocm_pidm%TYPE,
seq_no IN gordocm.gordocm_seq_no%TYPE,
vtyp_code IN gordocm.gordocm_vtyp_code%TYPE,
visa_number IN gordocm.gordocm_visa_number%TYPE,
docm_code IN gordocm.gordocm_docm_code%TYPE,
disposition IN gordocm.gordocm_disposition%TYPE,
user_id IN gordocm.gordocm_user_id%TYPE,
activity_date IN gordocm.gordocm_activity_date%TYPE,
srce_code IN gordocm.gordocm_srce_code%TYPE,
request_date IN gordocm.gordocm_request_date%TYPE,
received_date IN gordocm.gordocm_received_date%TYPE,
vpdi_gordocm IN gordocm.gordocm_vpdi_code%TYPE
IS
BEGIN
INSERT INTO gordocm
gordocm_pidm,
gordocm_seq_no,
gordocm_vtyp_code,
gordocm_visa_number,
gordocm_docm_code,
gordocm_disposition,
gordocm_user_id,
gordocm_activity_date,
gordocm_srce_code,
gordocm_request_date,
gordocm_received_date,
gordocm_vpdi_code
VALUES (
pidm,
seq_no,
vtyp_code,
visa_number,
docm_code,
disposition,
user_id,
activity_date,
srce_code,
request_date,
received_date,
'SV'
END p_gordocm_insert;
/* Procedure to update a row in gobintl table. */
PROCEDURE p_gobintl_update_row (pidm IN gobintl.gobintl_pidm%TYPE,
spouse_ind IN gobintl.gobintl_spouse_ind%TYPE,
signature_ind IN gobintl.gobintl_signature_ind%TYPE,
user_id IN gobintl.gobintl_user_id%TYPE,
activity_date IN gobintl.gobintl_activity_date%TYPE,
passport_id IN gobintl.gobintl_passport_id%TYPE,
natn_code_issue IN gobintl.gobintl_natn_code_issue%TYPE,
passport_exp_date IN gobintl.gobintl_passport_exp_date%TYPE,
i94_status IN gobintl.gobintl_i94_status%TYPE,
i94_date IN gobintl.gobintl_i94_date%TYPE,
reg_number IN gobintl.gobintl_reg_number%TYPE,
duration IN gobintl.gobintl_duration%TYPE,
celg_code IN gobintl.gobintl_celg_code%TYPE,
cert_number IN gobintl.gobintl_cert_number%TYPE,
cert_date_issue IN gobintl.gobintl_cert_date_issue%TYPE,
cert_date_receipt IN gobintl.gobintl_cert_date_receipt%TYPE,
admr_code IN gobintl.gobintl_admr_code%TYPE,
natn_code_birth IN gobintl.gobintl_natn_code_birth%TYPE,
natn_code_legal IN gobintl.gobintl_natn_code_legal%TYPE,
lang_code IN gobintl.gobintl_lang_code%TYPE,
spon_code IN gobintl.gobintl_spon_code%TYPE,
empt_code IN gobintl.gobintl_empt_code%TYPE,
foreign_ssn IN gobintl.gobintl_foreign_ssn%TYPE,
child_number IN gobintl.gobintl_child_number%TYPE,
vpdi IN gobintl.gobintl_vpdi_code%TYPE
IS
BEGIN
UPDATE gobintl
SET gobintl_spouse_ind = spouse_ind,
gobintl_signature_ind = signature_ind,
gobintl_user_id = user_id,
gobintl_activity_date = activity_date,
gobintl_passport_id = passport_id,
gobintl_natn_code_issue = natn_code_issue,
gobintl_passport_exp_date = passport_exp_date,
gobintl_i94_status = i94_status,
gobintl_i94_date = i94_date,
gobintl_reg_number = reg_number,
gobintl_duration = duration,
gobintl_celg_code = celg_code,
gobintl_cert_number = cert_number,
gobintl_cert_date_issue = cert_date_issue,
gobintl_cert_date_receipt = cert_date_receipt,
gobintl_admr_code = admr_code,
gobintl_natn_code_birth = natn_code_birth,
gobintl_natn_code_legal = natn_code_legal,
gobintl_lang_code = lang_code,
gobintl_spon_code = spon_code,
gobintl_empt_code = empt_code,
gobintl_foreign_ssn = foreign_ssn,
gobintl_child_number = child_number,
gobintl_vpdi_code = 'SV'
WHERE gobintl_pidm = pidm;
END p_gobintl_update_row;
/* Procedure to update a row in gordocm table. */
PROCEDURE p_gordocm_update_row (pidm IN gordocm.gordocm_pidm%TYPE,
seq_no IN gordocm.gordocm_seq_no%TYPE,
vtyp_code IN gordocm.gordocm_vtyp_code%TYPE,
visa_number IN gordocm.gordocm_visa_number%TYPE,
docm_code IN gordocm.gordocm_docm_code%TYPE,
disposition IN gordocm.gordocm_disposition%TYPE,
user_id IN gordocm.gordocm_user_id%TYPE,
activity_date IN gordocm.gordocm_activity_date%TYPE,
srce_code IN gordocm.gordocm_srce_code%TYPE,
request_date IN gordocm.gordocm_request_date%TYPE,
received_date IN gordocm.gordocm_received_date%TYPE,
vpdi_gordocm IN gordocm.gordocm_vpdi_code%TYPE
IS
BEGIN
UPDATE gordocm
SET gordocm_disposition = disposition,
gordocm_user_id = user_id,
gordocm_activity_date = activity_date,
gordocm_srce_code = srce_code,
gordocm_request_date = request_date,
gordocm_received_date = received_date,
gordocm_vpdi_code = vpdi_gordocm
WHERE gordocm_pidm = pidm
AND gordocm_seq_no = seq_no
AND gordocm_vtyp_code = vtyp_code
AND gordocm_visa_number = visa_number
AND gordocm_docm_code = docm_code;
END p_gordocm_update_row;
/* Procedure to delete a row from gobintl table. */
PROCEDURE p_gobintl_delete_row (pidm IN gobintl.gobintl_pidm%TYPE)
IS
BEGIN
DELETE FROM gobintl
WHERE gobintl_pidm = pidm;
END p_gobintl_delete_row;
/* Procedure to delete a row from gordocm table. */
PROCEDURE p_gordocm_delete_row (pidm IN gordocm.gordocm_pidm%TYPE,
seq_no IN gordocm.gordocm_seq_no%TYPE,
vtyp_code IN gordocm.gordocm_vtyp_code%TYPE,
visa_number IN gordocm.gordocm_visa_number%TYPE,
docm_code IN gordocm.gordocm_docm_code%TYPE
IS
BEGIN
DELETE FROM gordocm
WHERE gordocm_pidm = pidm
AND gordocm_seq_no = seq_no
AND gordocm_vtyp_code = vtyp_code
AND gordocm_visa_number = visa_number
AND gordocm_docm_code = docm_code;
END p_gordocm_delete_row;
END gokintl;
/Regards -
When installing apex 3.1.2 in Oracle RDBMS 9.2.0.8 Ii got the following errors:
command:
SQL> @apexins SYSAUX SYSAUX TEMP /i/
output:
APPLICATION 4411 - APEX - System Messages
Set Credentials...
Check Compatibility...
WWV_FLOW_API.FLOWS_API_LAST_EXTENDED20070906
WWV_FLOW_API.CURRENT_FLOWS_VERSION20070906
WWV_FLOW_API.IMPORT_COMPATIBLE_WITH_VERSION 20070108
WWV_FLOW_API.COMPATIBLE
Set Application ID...
begin
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04063: package body "FLOWS_030100.WWV_FLOW_UTILITIES" has errors
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "FLOWS_030100.WWV_FLOW_AUDIT", line 66
ORA-06512: at line 3
Checked table all_errors
output:
FLOWS_030100 WWV_FLOW_UTILITIES PACKAGE BODY 1 5928 3 PLS-00201: identifier 'DBMS_LOCK' must be declared
Any suggestions ?
Regards,
RemoHi Penny,
Your suggested solution worked.
However i got other errors and so i ran apxremov.sql to cleanup the installation.
Forgot to mention that there was a previous installation of apex.
After rerunning apexins.sql installation was completed succesfully.
Thanks for reply.
Remo
Maybe you are looking for
-
Is there a way to reduce the length of the Timeline?
In Captivate 6, one of my slides has an audio track that is a minute and thirty seconds long. No elements will go beyond a minute-thirty. But the timeline is twenty minutes and thirty-two seconds long. If I zoom in to fine-tune some layers the scroll
-
c an anyone tell me how to switch my operating system from 64 bit to 32 bit
-
Week 37 touch! Is it possible..
My iPod shipped yesterday and when I checked the invoice it says im getting a week 37, how is it possible that these are still being sent out by apple?! Is it possible that the touch i will receive is one that has been taken back to an apple store be
-
Download full copy mountain lion
I purchased a family license of Mountain Lion and upgraded 4 Macs. One of the Mac was reset to factory default to wipe out personal files. Now it will not load the original OS Leopard. I think the way around this is to load Mountain Lion since it was
-
Hi, I am using the VI "DB Tools Select Data" from the database connectivity toolset. And I have a problem with the VI "DB Tools Execute Query" that is included. I would like to select a specific column from a specific table in my database and it is o