Workaround solution to avoid duplicacy of pl/sql code
I have a procedure that inserts the date such as sysdate, but now it must be sent as a parameter.
Change the procedure means many applications should be changed. Other procrdure writing is just the duplicacy of the code.
Workaround ideas?
405193 wrote:
The procedure is called "emp_salIncome(?,?,?,?,?,?)". call' of the last of them Java applications is out parameter.
So what? You can always add a parameter to the end of this list
PROCEDURE emp_sallncome (p1 in numbers, p2 in number, p3 in number, p4 in number, in numbers, numberdate default sysdate p7p6 p5) is...
You can also write a new procedure with code copied across from the old and the added data parameter when you want in the list:
PROCEDURE emp_sallncome_new (p1 in numbers, p2 in number, p3 in number, p4 in number, p5 in number, date default sysdate, p6 number pnew) is...
Then re-write your original procedure like this:
PROCEDURE emp_sallncome (p1 in numbers, p2 in number, p3 in number, p4 in number, in numbers, number p6 p5) is
Start
emp_sallncome_new(P1,P2,P3,P4,P5,sysdate,P6);
end;
Tags: Database
Similar Questions
-
Show/hide of a player template; Workaround solution?
Hello!
I'm working on a several page form for my company to be used in three different States. With this master document, I have three different sets of supplementary forms (Applications of title, for example) that must be appended to the document according to state selected (via the check boxes on the front page).
I understood how to do this job using models and copy the following code (placed under Actions; mouse upward under the properties of the check box):
if(Event.Target.Value!="Yes")
{this.getTemplate("NH_TITLEAPP").hidden = true ;}
on the other
{this.getTemplate("NH_TITLEAPP").hidden = false ;}
My problem is the following; not all of my target Adobe Acrobat users have (only to have the player), and the 'hidden' property does not work with the player (why?).
I tried 'spawning' pages of the template which works fine in the drive, but I could not understand a simple way to get delete pages added if someone checks a box by accident. Instead, when "uncheck you" the box the page just generates again.
I'm desperately looking for a workaround solution; either a way to let the drive to 'hide' the model; or a way sure to delete a page generated by clearing a check box.
Any help would be greatly appreciated! I've already spent hours trying to find a workaround... Googling is not effective when it comes to something complicated like that.
Thank you!
After spawn you a model and that you no longer need, you can remove the page that has been added by using the doc.deletePages method, which works with the drive for pages that have been added by a model of spawning.
If unchecking that checkbox will cause this page to be generated again, then you will need to reconfigure or reprogram the action of the mouse upward so that it generates the model when selected and removed the page when it is disabled.
-
Anyone know how to get your money back? My CC application does not start and I have tried the suggested workaround solutions listed above and they have not worked for me. I'm new to the CC Apps but use the versions installed for years. The amount of questions listed here in this forum, I have to ask the product is really stable?
Thank you. I've deleted and reinstalled. Seems to have solved the problem.
-
We have several production servers, that we have recently upgraded to Windows 2008 R2, only to discover after the fact that VMWare Converter currently does not support convert a physical machine to a VMWare image. The servers are actually images of Hyper-V, but since there is no way to convert the computer virtual Hyper-V to VMWare, we have always used the P2V conversion with our Windows 2008 Server (not R2) without problem.
Its imperative that we find a way to do this and I was hoping to see if anyone has found any workaround for this problem.
We would prefer not to have to buy another product for that (i.e. using Acronis or Symantec Backup), as one would expect VMWare to support it eventually (even if it is the only option, we will have to examine it). We simply need a workaround solution for us until they do.
Thanks a bunch!
Hello.
Have you tried the StarWind V2V Converterfree?
Good luck!
-
Dynamic Action run PL/SQL Code runs is not after 4.2.5 upgrade
APEX 4.2.4 to 4.2.5 11.2 database upgrade
I have a button to click on DA who owns shares run of PL/SQL Code and update point who worked in version 4.2.4 which is no longer running after the 4.2.5 patch.
The PL/SQL procedure has been tested autonomous and it runs correctly.
I tested him DA is actually shot on the click event by adding an alert "DA xxxx pulled" action before the execution of work of PL/SQL action and action alert.
There is also a similar on DA click which makes the action opposite to the DA problem and it works both are configured in the same way:
Static DA, run Code PL/SQL - check waiting for result, and not repress with the same Submit and return items.
Any ideas on a possible cause/solution much appreciated
Fixed it, the question was the Page elements of return of goods on the action of PL/SQL Code:
If the target element was empty the action failed, by adding a value in the database through a normal SQL insert then the insert DA completed successfully.
Removing Page elements at the point of return of the action of PL/SQL and together action update the target element after the DA fires in all scenarios.
But thanks for the lead
-
First of all, Hi everyone.
I need to encrypt my PL/SQL code at run time. I thought using the wrap.exe, but it won't be a good option, once maybe I need to change something in the code and I'll not can send the code wrapped to the final customer. So, I'll use the DBMS_DDL. WRAP, but I have a doubt, I understand that my object will be encrypted in the database, but how can I prevent software this capture SQL (like SQL STATEMENTS TRACE) get the source when creating the object?
Thank you very much.Agree with SomeoneElse, having a license legally correct contract protects your code.
The package code is not a bad thing if that's what you are providing to the customer and that you have in place adequate source code controls, so you do not lose the source for yourself. Although there are "unwrappers" out there, it may depend on the version of Oracle as to how well they work, and if they can achieve. There are tools out there too which can obscure the PL/SQL code by doing things such as the conversion of all the variable names to things without meaning as a0001, a0002, a0003,... and deletes all comments etc before you wrap, so even if someone manages to undo what they are presented with the code that is more difficult to follow.
Regarding the customer can see SQL running, you won't really be able to do something that, if the customer has access of type DBA to the database; the only thing you can do to avoid this is to provide a managed service where your company has total control of provides a full support for the server, database and applications and the client does not have access to all but the front end of the application. Of course, if the customer has access to the database and can see running SQL code, then who can actually be beneficial if they have problems, because they can do their own initial analysis to determine the cause and determine if they should send the question to yourselves.
-
frmcmp cannot compile the modules containing SQL code that connected to the database
Hello
I checked several hundred messages of the forum on the net without finding a solution.
I have a Linux server with 11.1 WebLogics (11 GR 1 material) and FormsRuntime installed.
I am logged in as root.
I put all the environment variables based on the values in default.env.
In addition, I updated TERM and ORACLE_TERM vt220. And TNS_ADMIN to the location of the sqlnet.ora and tnsnames.ora.
I compiled a simple .pll containing only the following code:
IS test PROCEDURE
an INTEGER: = 0;
BEGIN
a: = 1;
END;
command:
frmcmp_batch module = TESTLIBPLAIN.pll userid=myuser/mypassword@mydb module_type = LIBRARY output_file = TESTLIBPLAIN.plx compile_all = Yes = Yes = No. batch connection
result: successful compilation. generated .plx.
now, I'm trying to compile an another .pll containing just the following code:
IS test PROCEDURE
an INTEGER: = 0;
BEGIN
Select 1 in the doubles.
END;
command:
frmcmp_batch module = TESTLIBSQL.pll userid=myuser/mypassword@mydb module_type = LIBRARY output_file = TESTLIBSQL.plx compile_all = Yes = Yes = No. batch connection
result: error:
"
11 forms (form of the compiler) Version 11.1.1.3.0 (Production)
Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With partitioning, OLAP and Data Mining options
PL/SQL Version 11.1.0.7.0 (Production)
Oracle V11.1.1.3.0 - Production procedure generator
Oracle virtual graphics system Version 11.1.1.3.0 (Production)
Oracle Multimedia Version 11.1.1.3.0 (Production)
Oracle tools integration Version 11.1.1.2.0 (Production)
Common tools Oracle area Version 11.1.1.3.0
Oracle CORE Production 11.1.0.7.0
Compile the library TESTLIB.
Invalidate the body TEST procedure...
Compilation of body TEST procedure...
ERROR on line 5, column 1 0
Ignored SQL statement
Library TESTLIB closing...
Errors on TEST:
PL/SQL ERROR on line 5, column 1 0
Ignored SQL statement
Could not generate the library.
FRM-30312: unable to compile the library.
"
the two libraries differ by having used SQl commands or not.
I tried to compile some more complex .pll and .fmb containg the SQL code. I get similar error messages. The messages that I receive for each module are the same, I would get when compiling the module with FormBuilder 9i (Windows) without being connected to the database.
So my first thought was, this frmcmp_batch is unable to connect to the database.
BUT:
From frmcmp_batch with an invalid user, password, or database name not existing (resp. not in tnsnames.ora), results in appropriate error messages (not found TNS, refusal to sign etc.).
With myuser/mypassword@mydb I don' t get this kind of messages.
sqlplus myuser/mypassword@mydb works.
myuser can access all objects in the database mydb.
mydb tnsping works.
When I check v$ session on mydb while (!) frmcmp_batch is running, I see that it is in fact a db session, created from myuser: DB-User = myuser, terminal = myappsever, osuser = root, remote process = frmcmp_batch. And State of the current session of the db is ACTIVE.
As a result, frmcmp_batch fails with error messages that I expect that when there is no connection to the base, if it is connected!
Any ideas what could be wrong with my setup?
Help appreciated.
Jean
I found the solution. Seems, fmrcmp 11g can connect to, but compiles not on the 9i database. With the help of a Database 11 g resolves the problem :-)
-
The call to the Workflow background process explicit in the pl/sql code
Hi all
We have a requirement where we need to call the "Workflow background process" explicitly in the pl/sql code.
Our wish is that we have an application that runs via a competing program, but before the end of this application we want to put that on the wait and run the 'Workflow background process"explicitly in the code itself (user must not go and run it manually).
Can someone please advice me how to do this in a PL/SQL code that is called via a concurrent program.
Kind regards
ShrutiPL post Details of the operating system, database and versions EBS.
One solution is to use the FND_SUBMIT API
The most common FND API in APPS customizations [ID 221549.1]
Code example for call Customer Interface RACUST program using the Api FND_SUBMIT 11i and R12 [429278.1 ID]https://forums.Oracle.com/forums/search.jspa?threadID=&q=FND_SUBMIT&objid=C3&DateRange=all&userid=&NumResults=15
HTH
Srini -
I am getting fake SQL code when generating types in JDevelper 11.1.1.3.0.
Process:
1. create a new application: Test
2. create a new project: Project1
3. create the database offline: ECIS
4. create a contact schema
5 create a type:
CREATE OR REPLACE TYPE HAS_REASON_OF_CETYPE AS OBJECT
(
has_reason_of varchar2 (36)
)
6 create a table based on the previous type type:
CREATE OR REPLACE TYPE HAS_REASON_OF_CETYPE_LIST
AS THE contact.has_reason_of_cetype TABLE;
7. generate SQL script. Results:
CREATE THE HAS_REASON_OF_CETYPE_LIST TYPE
AS_REASON_OF_CETYPE_LIST <-this is the wrong code
AS THE contact.has_reason_of_cetype TABLE;
/
CREATE THE HAS_REASON_OF_CETYPE TYPE
AS_REASON_OF_CETYPE AS OBJECT <-fact here too
(
has_reason_of varchar2 (36)
)
/
I have not seen this error with type names in our project, or this error in the previous version. Someone has seen this before and knows a way around it?
Published by: user13324293 on July 20, 2010 11:48It's a regression in the PS2 (11.1.1.3.0) during our generation of DDL has been rewritten. The problem, in a nutshell, is that while determining if the generated DDL must precede the name of the object with a differnet scheme, there are some erroneous (simpler) made of string manipulation. So if the name (or schema.name) in the source contains the token of what follows (ie the ACE or IS) has the problem. This problem is fixed in 11.1.2.0.0 and 11.1.1.4.0 streams.
There are two possible solutions.
You can use instead OF as in the above case (in the STATE does not appear in the name) or simply change the case of ACE so that it is not the same as in the name - that is to say use "beneath", 'As' or 'Sub '.
I hope this helps.
Pete - team JDeveloper DB
-
Result passage of PL/SQL code for the page element
Hello
I have created a process in after the header to fill data to the page of the form elements. The pl/sql code is like bellows. Then I got the error message:
ORA-06502: PL/SQL: digital or value error: character number conversion
My question is that I do not see the difference in format between the page element and block pl/sql variables (e.g. : P31_STUDY_ID vs v_P31_STUDY_ID), they are either numeric or text field (in fact I have hidden field, but don't see conversion back to the digital field solved the problem). And don't see needs to set the format mask. Is there another way to detect the column that causes the problem, or if there is a syntax error with my assignment (from the variable element on the page)? Thank you very much!
============================
Declare
number of v_P31_STUDY_ID;
number of v_P31_STUDY_SITE_ID;
v_P31_STUDY_SITE_NAME VARCHAR2 (255);
v_P31_STUDY_SITE_NUM varchar2 (10);
number of v_P31_STUDY_SITE_NAME_NUM_ID;
number of v_P31_STUDY_SITE_OPEN_STATUS;
v_p31_comments VARCHAR2 (255);
Start
Select
tbl_study_site.study_id,
tbl_study_site.study_site_id,
study_site_name,
study_site_num,
STUDY_SITE_NAME_NUM_ID,
STUDY_SITE_OPEN_STATUS,
Comments
in
v_P31_STUDY_ID,
v_P31_STUDY_SITE_ID,
v_P31_STUDY_SITE_NAME,
v_P31_STUDY_SITE_NUM,
v_P31_STUDY_SITE_NAME_NUM_ID,
v_P31_STUDY_SITE_OPEN_STATUS,
v_p31_comments
of tbl_study_site, tbl_study_site_attrib
where tbl_study_site.study_id =: p30_study_name
and tbl_study_site.study_site_id = tbl_study_site_attrib. STUDY_SITE_ID
and tbl_study_site_attrib. STUDY_SITE_ATTRIB_ID =: P31_STUDY_SITE_ATTRIB_ID;
: P31_STUDY_ID: = v_P31_STUDY_ID;
: P31_STUDY_SITE_ID: = v_P31_STUDY_SITE_ID;
: P31_STUDY_SITE_NAME: = v_P31_STUDY_SITE_NAME;
: P31_STUDY_SITE_NUM: = v_P31_STUDY_SITE_NUM;
: P31_STUDY_SITE_NAME_NUM_ID: = v_P31_STUDY_SITE_NAME_NUM_ID;
: P31_STUDY_SITE_OPEN_STATUS: = v_P31_STUDY_SITE_OPEN_STATUS;
: P31_COMMENTS: = v_p31_comments;
end;
=============================
Identify the root cause. He's always on the format of the column, there is an error. Thanks for your help.
-
Apex - disable the button using PL/SQL code
Hi all
I use a PL/SQL code to get a DB value, depending on the value that I need to disable the buttons on the Page.
I tried code below
IF : P2_FLAG == ' not THEN
HTP.script ("document.getElementById ("SUBMIT") .disabled = false;", "Javascript");
END IF;
It is said screw the page saying - the/apex/f requested URL was not found on this server
I use Apex 5.0, please need your contributions.
Hello
However, if you want to show/hide the button, you can use conditions:
Open the properties of the button and put Conditions such as "Item = value '.
Point - P2_FLAG
Value - N
To turn on or off, you must run ajax with jquery to get the DB value before charge and then print button.
It may be useful
Sunil Bhatia
-
Extensions: Convert T - SQL code
Hello
Do we not have an extension for SQL Developer that converts the Oracle in T - SQL code?
Thank you
Do we not have an extension for SQL Developer that converts the Oracle in T - SQL code?
There is such an extension. It is called a "consultant."
See you soon,.
Brian
-
Impact of writing more comments in the pl/sql code
What is the impact of writing more comments in the pl/sql code. If it has an impact on the compile time, it is fine but it has no effect on the runtime? even in nano seconds?
Hello
2981581 wrote:
What is the impact of writing more comments in the pl/sql code. If it has an impact on the compile time, it is fine but it has no effect on the runtime? even in nano seconds?
Outside advice, comments have no effect on the runtime.
They can have a big impact on maintenance time.
-
PL/SQL code to add to the data file
Can someone help me with a PL/SQL code. I want to do the following:
get the latest data from the tablespace file
If (value > 30 GB)
then
Loop
change the database add datafile '+ DATA01' size 30 GB
# Note data file cannot be larger than 30 GB
# IE if 40 GB is entered as 2 entries are created one for 30 GB
# the second for 10 GB
end loop
on the other
same logic adds size datafile up to 30 GB
Loop
If you go over 30 GB that to create the new data file
End of loop
IfPlease excuse the syntax I know its not correct. In summary,.
what I want to do is to create data no larger than 30 GB files for the
extra space simply create new datafiles Nigerian, we reached the "value in".
limitHe can be hard-code "«+ DATA01»»
Note, I don't want to use datafile autoextend I want to control the size of my storage space...
Any code would be greatly apprecuated.
Thanks to all those who responded
create or replace procedure add_datafile( p_tablespace varchar2, p_size_in_gibabytes number ) is space_required number := 0; space_created number := 0; file_max_size number := 30; last_file_size number := 0; begin for ts in ( select tablespace_name, round(sum(bytes / 1024 / 1024 / 1024)) current_gigabytes from dba_data_files where tablespace_name = upper(p_tablespace) group by tablespace_name ) loop dbms_output.put_line('-- current size of ' || ts.tablespace_name || ' is ' || ts.current_gigabytes || 'G'); space_required := p_size_in_gibabytes - ts.current_gigabytes; dbms_output.put_line('-- adding files ' || space_required || 'G up to ' || p_size_in_gibabytes || 'G with files max ' || file_max_size || 'G'); last_file_size := mod(space_required, file_max_size); while space_created < (space_required - last_file_size) loop dbms_output.put_line('alter tablespace ' || ts.tablespace_name || q'" add datafile '+DATA01' size "' || file_max_size || 'G;'); space_created := space_created + file_max_size; end loop; if space_created < space_required then dbms_output.put_line('alter tablespace ' || ts.tablespace_name || q'" add datafile '+DATA01' size "' || last_file_size || 'G;'); end if; end loop; end; / set serveroutput on size unlimited exec add_datafile('sysaux', 65); PROCEDURE ADD_DATAFILE compiled anonymous block completed -- current size of SYSAUX is 1G -- adding files 64G up to 65G with files max 30G alter tablespace SYSAUX add datafile '+DATA01' size 30G; alter tablespace SYSAUX add datafile '+DATA01' size 30G; alter tablespace SYSAUX add datafile '+DATA01' size 4G;
-
How to invoke the export and import of orders for all tables of pl/sql code?
I want to export a few (not entire schema) tables from one database to another. But I want to run as a PL/SQL package so that I can call it from an application server. So my question is...
How to call a tax / export commands from pl/sql code (SP or packaging) so that I can call these (SP or packaging) as a JDBC application server call?
Krishna_Architect wrote:
I want to export a few (not entire schema) tables from one database to another. But I want to run as a PL/SQL package so that I can call it from an application server. So my question is...
How to call a tax / export commands from pl/sql code (SP or packaging) so that I can call these (SP or packaging) as a JDBC application server call?
When all else fails, read the Fine
Maybe you are looking for
-
to clear the cache before loading each page
I can't access a particular Web site. I can reach other sites very well. I had it happen with another site and my history of compensation has solved the problem. Now, it's another site. If I clear my history (cache, cookies) I can get to the first pa
-
Anyone any idea, what type of memory, I can add to the 64 MB I have in my CT 110 booklet? Would like tothe processor clock and add as much memory I can put in there and last but not least to change the HARD disk. I use the original 4.3 GB C and D par
-
Previously, the "Find updates" option is located under the Help menu. In Firefox 4, I can't find this option; How will we be able to check if there are updates available? Can this new version to update automatically? How to set this option?
-
I lost the driver and you can attach no more than one display. the docking station does not work correctly. Where can I find and download the driver
-
Cannot create Backup factory or Rescue Disk on USB media
For my new laptop Dell Inspiron 15 with WIndows 8, I am creating a backup of the plant (~ 30 GB I would guess based on how many C:\ is used) on my 110 GB Western Digital USB external hard drive, and I am trying to create a rescue disk (~ 13 GB) on 16