Plsql Code Help
Hi everyone,
I am sorry for what all mistakes I have done earlier. As, I am a new member, I didn't learn all the FAQ in OTN. But now, I read all the FAQ's developed by Blueshadow and I need anyone to help me modifying the code for my new business rule. Once again I am sorry to Venkadesh, ACE, Gary, Etbin and Blueshadow for all my mistakes.
Sara Dee
CN_DEFAULT_LANGUAGE_ID cad_languages.language_id%type default toe$translate.fn_get_language_id;
GKV_SLI_SITE_CHAMP_URL constant cad_parameters.text_value%type default cad$param.get_parameter_text_value('TUP_SLI_SITE_CHAMP_URL',GCN_DEFAULT_COMPANY_ID);
GKV_SLI_SEARCH_COUNT constant cad_parameters.number_value%type default cad$param.get_parameter_number_value('TUP_SLI_SEARCH_COUNT',GCN_DEFAULT_COMPANY_ID);
GKV_SLI_XML_PATH constant cad_parameters.text_value%type default cad$param.get_parameter_text_value('TUP_SLI_XML_PATH',GCN_DEFAULT_COMPANY_ID);
GKV_SLI_XML_NODE1_NAME constant cad_parameters.text_value%type default cad$param.get_parameter_text_value('TUP_SLI_XML_NODE1_NAME',GCN_DEFAULT_COMPANY_ID);
GKV_SLI_XML_NODE2_NAME constant cad_parameters.text_value%type default cad$param.get_parameter_text_value('TUP_SLI_XML_NODE2_NAME',GCN_DEFAULT_COMPANY_ID);
gv_ip_redirect_url varchar2(1000);
gv_refer_url varchar2(1000);
gv_sli_search_url varchar2(1000);
gv_page_ref_url varchar2(1000);
gv_procedure_name varchar2(100);
gv_item_number varchar2(30);
gv_category_code varchar2(30);
gv_category_page_num varchar2(3);
gv_section varchar2(30);
gv_user varchar2(30);
gv_lang varchar2(30);
gv_gift_code varchar2(30);
gv_fname varchar2(50);
gv_lname varchar2(50);
gv_email varchar2(100);
gv_message varchar2(2000);
gv_face_amount tup_gift_certificates.face_value_amount%type;
gv_error_message varchar2(2000);
gv_def_category varchar2(30) := null;
gv_categ_description varchar2(1000);
gn_company_id number default cad$user_api.get_user_company_id;
gn_language_id number default toe$translate.fn_get_language_id;
gn_script_id number := -1;
gn_retail_price_list_id number := coe$item.get_event_price_list_id;
gn_gift_certificate number;
gn_page_number number;
gn_page_count number;
gn_order_id number;
gn_start_price number;
gn_end_price number;
gi_heading_index binary_integer;
gn_total_items number := 0;
gkn_page_item_max constant number := 14;
gkn_items_per_row constant number := 7;
gb_gifts_found boolean := false;
gb_pk_details_found boolean := false;
gb_show_pdc boolean := false;
gb_show_item_photo boolean := false;
gb_show_item_host boolean := false;
ge_ip_address_restricted exception;
ge_no_parent_item exception;
gcv_registry varchar2(30) default common_global.f_get_cookie_value('registry');
gcv_registry_status varchar2(30) default common_global.f_get_cookie_value('registry_status');
gcv_highlight_class varchar2(50) default common_defaults.f_get_class_name('highlight',gcv_registry_status);
gcv_hyp_color_class varchar2(50) default common_defaults.f_get_class_name('hyp_color',gcv_registry_status);
gcv_headline_class varchar2(50) default common_defaults.f_get_class_name('headline',gcv_registry_status);
gcv_form_class varchar2(50) default common_defaults.f_get_class_name('form',gcv_registry_status);
cursor gcr_item_data ( cfv_item_category_code varchar2,
cpn_script_id number,
cpn_relship_type_id number)
is
select /*+ ordered use_nl( cic, cicm, cmi) */
cicm.sort_order,
cmi.item_number master_item_number,
cmi.small_image_description detail,
cmi.image_filename image_filename,
cmi.long_description long_description,
cmi.short_description short_desc,
cmi.small_image_filename small_image_filename,
cmi.numeric_item_number,
1 relationship_type
from coe_item_categories cic,
coe_item_category_mappings cicm,
coe_master_items cmi
where sysdate between nvl (cmi.start_date, sysdate - 1) and nvl (cmi.end_date, sysdate + 1)
and cmi.inactive_flag = 0
and exists (select 'x'
from coe_item_relationships cir,
coe_event_item_prices eip
where cir.parent_master_item_id = cmi.master_item_id
and cir.child_master_item_id = eip.master_item_id
and cir.company_id = eip.company_id+0
and eip.event_price_list_id+0 = gn_retail_price_list_id
and eip.inactive_flag = 0
and sysdate between eip.start_time_date and nvl(eip.end_time_date, sysdate)
and cir.item_relationship_type_id+0 = cpn_relship_type_id
and cir.inactive_flag = 0
and sysdate between nvl (cir.start_time_date, sysdate - 1) and nvl(cir.end_time_date, sysdate + 1) --TSR 32282
--and cir.company_id+0 = gn_company_id
and cmi.master_item_id = cicm.master_item_id
and nvl(cicm.script_id, cpn_script_id) = cpn_script_id
and (sysdate) between nvl (cicm.start_time_date, sysdate - 1) and nvl (cicm.end_time_date, sysdate + 1)
and cicm.inactive_flag = 0
and cic.item_category_code = cicm.item_category_code
and cic.display_heading_flag = 1
and cic.item_category_code = cfv_item_category_code
union all
select /*+ ordered use_nl( cic, cicm, cmi) */
cicm.sort_order,
cmi.item_number master_item_number,
cmi.small_image_description detail,
cmi.image_filename image_filename,
cmi.long_description long_description,
cmi.short_description short_desc,
cmi.small_image_filename small_image_filename,
cmi.numeric_item_number,
0 relationship_type
from coe_item_categories cic,
coe_item_category_mappings cicm,
coe_master_items cmi
where sysdate between nvl (cmi.start_date, sysdate - 1) and nvl (cmi.end_date, sysdate + 1)
and cmi.inactive_flag = 0
and exists (select 'x'
from coe_event_item_prices eip
where cmi.master_item_id = eip.master_item_id
and eip.event_price_list_id+0 = gn_retail_price_list_id
and eip.inactive_flag = 0
and sysdate between eip.start_time_date and eip.end_time_date
and cmi.master_item_id = cicm.master_item_id
and nvl(cicm.script_id, cpn_script_id) = cpn_script_id
and sysdate between nvl (cicm.start_time_date, sysdate - 1) and nvl (cicm.end_time_date, sysdate + 1)
and cicm.inactive_flag = 0
and cic.item_category_code = cicm.item_category_code
and cic.display_heading_flag = 1
and cic.item_category_code = cfv_item_category_code
order by 1, 2;
Similar Messages
-
How to explicitely write PLSQL code for "Help - Display Error"? [SOLVED]
I'm using menu DEFAULT&SMARTBAR and I'd like to write command in PLSQL code for "Help - Display Error" to display error. Has anyone any idea how to do this? I can not find syntaks in form help for this.
Message was edited by:
marussigDisplay_Error;
-
Hi APEX users and developer, especially forum's active users, please get me rid of this problem because it is really very bad situation.
I have a real trouble with application. It behaves unusual. Application is used by 60 users but only 3 of them have these problem and they can not use the application anymore.
Application is
http://apex.oracle.com/pls/apex/f?p=70547
After fields are filled and some rows checked from tabular form in page, user submits the page. Process called newReyestr calls plsql procedure from package with inputs from page. But only same 3 users get empty fields in plsql code. I see it just after when the first line stepped in procedure.
So, "what is the problem?"Hi NoGot,
you know, I have not written big quote. The code was big. But it has no any meaning. Because problem is in first line. No need to understand it.
There is no any difference between those users. They also tried it from different browser and even computers.
BTW: I am not russian. -
ORA-01403: no data found Error in PLSQL code raised during plug-in processing.
Hello OTN community,
We are having the access to APEX problem. a New user was setup to access the APEX application. When I test to login as a new user, I get the message "ORA-01403: no data found Error in PLSQL code raised during plug-in processing.". When click OK to the disply message, the application will take me out of the sstem. I need help to even understand what is happening. I didn't develop the application, there is no documentation for this application, I am just supporting the application whenever there is a problem and I am new to APEX. As you can see I need help to figure this thing out. Your help is dearly appreciated.
Thank you OTNTry to check the query that is executed and check if there is data or not
-
How to write a file in unix server through oracle plsql code
Hi All,
My requirement is to create and write a file (any file for eg txt file) in unix box with in a specified directory through oracle plsql code.
Oracle sits in windows server.
using utl_file package we can create directory where oracle resides and write it there in oracle server in our case windows..
But here we need to create,write a file but in unix server which is different server than where the oracle server resides..
we are using Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
Can any one one please help me out in this issue...
Thanks in Advance.
PrakashMr Prakash,
Why are you asking this question multiple times in every forum you can spell?
Valid responses have been presented to you already two times.
Can you explain why you can't follow them up, but continue to abuse this forum by repeating doc questions?
Sybrand Bakker
Senior Oracle DBA -
Displaying Images in a Report or in PLSQL Code
Hi all,
I have a products catelog in an items table (item_id, item_name, item_image (blob)). I want to display it in a table form but Reports in Portal30 do not allow images.
I can write simple PLSQL code to display table contents in tabular form (using htp, htp packages) but I could not find any procedure/function to display image stored in a db table to an HTML table.
I shall be grateful for any help or hint regarding this. You can mail me directly if you like.Armaghan
This question is best asked in the Oracle9iAS Portal Applications Forum. -
How to call jsp in PLSQL code (to upload a file in IFS)
Hello,
We develop our PORTAL (9.0.2) with PL/SQL way.
We want to make a form to upload file in IFS.
We create a form like that :
htp.formOpen(cmethod =>'post',
cenctype => 'multipart/form-data',
curl => '/pls/ptlcollab/ptlcollab.GestionDoc_screenbuilder.manipTableIFS',
cattributes => 'name="ifs"') ;
htp.TableData(htf.FORMFILE(cname=>'file', cattributes => 'size="25"')) ;
The manipTableIFS procedure calls a loaded java procedure which called a servlet which work with IFS.
BUT, modplsql seems to want we directly upload the doc in a table but we want to upload the doc in iFS !!!
So, the solutiuon seems to call a jsp (or a servlet directly from our plsql code).
BUT, how could I do that ???
Any help would be greatly appreciated.
Regards.
Luc.Something along these lines ought to do what you want:
<html>
<body>
<form name='foobar' action='foobar.jsp'>
<script language='Javascript'>
function askim() {
if (confirm('Is you sure?')) {
document.foobar.submit();
} else return false;
</script>
<input type='button' value='Submit' onClick='askim()'>
</form>
</body>
</html>
Your mileage may vary.
But the idea here is that the Javascript merely submits the form if the user clicks "OK" on the confirmation pop-up. Otherwise, nothing happens. The form is submitted to a JSP file which accepts the request, does something (such as call your Java class), then prints out some HTML in response. -
Hide or encrypt password in SQL/PLSQL code
Hi,
I need some help or suggestions to hide or encrypt database user password in SQL/PLSQL code. In our environment, we use a connect string with username/password for the JDBC connection. Our goal is to take out the password string and read it or pass it to the code on the fly.
Thanks,
SubrotoSo in the database somewhere you are storing username and password credentials? How do those credentials get sent to the Java application? Presumably, the Java application has to connect to the database, requiring a JDBC connection string, in order to query the table in order to get the username and password you've stored in the database.
Assuming there are two different JDBC connection strings-- one in the Java application that connects to the database and a second that is stored in the database and used later by the Java application, who do you want to protect the data from? Do you want to protect it from other database users? Or do you want to protect it from the Java developers? Or something else?
Justin -
Passing message from plsql code to page
Hello Everybody,
I am trying to pass a 'success message' from plsql code which runs on page processing to the page. This plsql is a insert statement and if statement runs successfully (on submit) then I want to show a success message on the page after summit.
Your comment and help would be appreciated.
Thanks,
Raj.Thank you Tony.
Stored Procedure which I am calling on the page is running in database. So if this procedure runs successfully(or vice versa), how I would know?? Is there a way to pass value from database stored procedure to it's calling page?
Following is procedure:
procedure load_stateday_result(key_loc ATM_STATE_DAY_INSP.KEY_LOCATION%type) is
temp_key_insp ATM_INSPECTION.KEY_ATM_INSPECTION%type;
temp_key_location number(8);
temp_dte_schedule date;
begin
temp_key_location := key_loc;
select key_atm_inspection,dte_schedule into temp_key_insp, temp_dte_schedule
from atm_inspection where
key_location = temp_key_location and exam_type = 'D' and exam_yr = to_char(sysdate,'yyyy');
insert into atm_state_day_insp(key_atm_state_day_insp,key_location,key_atm_insp,scheduled_dte)
values(state_day_insp_seq.nextval,key_loc,temp_key_insp,temp_dte_schedule);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error :'|| SQLCODE||':'||SQLERRM);
--ROLLBACK;
RAISE;
end load_stateday_result;
Will appreciate your reply.
Thanks,
Raj, NY -
Debug plsql code in sqldeveloper
Hi all,
I am new to sql developer, can anyone help me how can i debug a plsql code in sqldeveloper for each step ( each line ) and also i want to view the value of the variables used in plsql code after completion of each line execution.
Thanks,http://www.thatjeffsmith.com/archive/2011/12/the-plsql-debugger-strikes-back-episode-v/
-
Hii...Experts
I ve written a plsql anonymous block code in database . That code is selecting 2 columns from source and want to implement that code in ODI interface in such a way that the values of two columns should be loaded into target.
How to do the such interface??
Please Help..
Thanks
Edited by: soumya.rn on Mar 23, 2012 3:54 AMIf yoru PLSQL code is in a "oracle package" object, you can call this object in an ODI interface
example :
your oracle package is called "my_PL_proc" and the parameter requires the source column "ID_PRODUCT"
in your ODI mapping, you can call it :
<%=odiRef.getObjectName("L", "my_PL_proc", "D") %>(source_table.ID_PRODUCT) -
VIEW PLSQL CODE GENERATED IN ETL MAPPING
hi,
can anyone help me to find the option in owb where i can view the plsql code generated after etl mapping
thanksHi
Yes you can view it from the entire generated code;
http://blogs.oracle.com/warehousebuilder/entry/owb_11gr2_errors_and_line_numbers
You can also view intermediate code from within the mapping editor;
http://blogs.oracle.com/warehousebuilder/entry/owb_11gr2_debugging
Cheers
David -
Run PLSQL code by click on button usin javascript
Hi
I want to run plsql code
on click button using javascript
javascript is ok but code of plsql is not run
suggest me
APEX 4.2.1
Oracle !!XE
Windows Server
Firefox 17.0.1
Theme Cloudy
thanks in advance
bUTTON CODE IN PLSQL CODE AND SEND_RMNDE IS PROCEDURE
'<button type="button" name="button1" onclick="send_rmndr('
||NO_DUES_MASTER.CERT_ID
||');" value ='
||NO_DUES_MASTER.CERT_ID
||'> '
||'Remind'
||'</button>'
JAVASCRIPT
<script type="text/javascript">
function send_rmndr(pThis)
var params='x= '+pThis;
var get=new htmldb_Get(null,null,null,&APP_PAGE_ID.,null,'send_reminder',params);
gReturn = get.get();
//alert(gReturn);
alert ('inside script ' +params);
//get=null;
</script>
Edited by: 969091 on Feb 1, 2013 9:13 PMsend_reminder needs to be defined as an application process
Alternatively, you can define a dynamic action and do this more declaratively.
It's easy to define a DA that fires on click of a button that runs PL/SQL, and you can also define which page items are sent to and received from the plsql via session state.
Scott
blog: [url grassroots-oracle.com]grassroots-oracle.com
twitter: [url twitter.com/swesley_perth]@swesley_perth
-- please mark any useful posts as helpful or correct, in the end it helps us all -
Simple PHP and PLSQL Bind help needed
HI,
I am learning php and oracle I am trying to bind my plsql code with php but have little idea can anyone plese help?.
my code is
plsql prcoedure
CREATE OR REPLACE PROCEDURE get_width (
img_id IN arm_photos.id%TYPE
AS
image ORDSYS.ORDImage;
width INTEGER;
BEGIN
SELECT p.image INTO image FROM arm_photos p
WHERE p.id = img_id;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;
PHP code
<?php
$c =oci_connect('user', 'pass' , '//localhost/orcl');
$s = oci_parse($c, " begin
get_width(:id :width)");
oci_bind_by_name($s, ':id', $id);
oci_bind_by_name($s, ':width', $width);
$id= 1235;
oci_execute($s);
?>Variable width is a local variable. You can't get its value from outside SP. Either change your procedure to a function returning image width or add a second out parameter:
CREATE OR REPLACE PROCEDURE get_width (
img_id IN arm_photos.id%TYPE,width OUT INTEGER
AS
image ORDSYS.ORDImage;
BEGIN
SELECT p.image INTO image FROM arm_photos p
WHERE p.id = img_id;
-- Get the image width:
width := image.getWidth();
DBMS_OUTPUT.PUT_LINE('Width is ' || width);
COMMIT;
END;SY. -
Executing dynamic action JS then plsql code with checkbox.
All,
I have a checkbox which when clicked i want to run javascript expression then next plsql code in that sequence. But iam getting the first issue here when i put in JS an expression like document.getElementById("P111_CHECK1").value ... or even document.getElementById("P111_CHECK1").checked i always get undefined error. So how can i determine if the checkbox is checked or unchecked in DA? thanks in advance.Hi,
still stuck here on how do i check/uncheck a single checkbox in Apex i tried via dynamic action JS expression like this but doesnt work ==> document.getElementById("P111_CHECKBOX1").checked = true/false; Any help on this pls?
Maybe you are looking for
-
The App Store on my iPad2 is using the wrong apple ID-how do I change it?
I can't update any apps on my iPad2 because the store keeps asking for my password on an appleID that is no longer valid. It was my old comcast email, which I cancelled, and even though I've tried signing out of store, and signing back in with the c
-
How to update Adobe Flash Player?
I have gone through all the steps (including uninstalling Flash Player) and I still get the error message: "Unable to load metafile" - what do I do now?
-
Recovery disk assistant for Maverick
I installed Maverick without a hitch. I have Time Machine working. I want to create a Recovery Disk on a USB. I had previously done this under Mountain Lion using the Recovery Disk Assistant. When I open this program to create a new Recovery Disk
-
Restrict number of rows in table view
Can a table view has only as many rows as the actual rows in the underlying data structure. Actually, I have a table view with less than 5 rows, but the tableview shows like 15+ rows with the rest of the rows as blank(alternative colors for each empt
-
OS X Mavericks free upgrade failed - any advice?