oracle11g

passing PHP array to Oracle Stored Proc (PLS-00306: wrong number or types of arguments)

余生颓废 提交于 2019-12-12 15:29:21
问题 Using PHP 5.3.2 and Oracle 11G, I'm trying to pass an array from PHP into an oracle stored proc. Here is my PL/SQL: create or replace type NUM_ARRAY as table of number; create or replace package txa as procedure upsert_txa_compliance_slct( v_compl_id_array in num_array); end txa; create or replace package body txa as procedure upsert_txa_compliance_slct(v_compl_id_array in num_array) is begin . . -- sql code removed for brevity. package and body compile no errors . end upsert_txa_compliance

Oracle ApEx Checkbox to Manipulate Other Values When Checked/Unchecked

[亡魂溺海] 提交于 2019-12-12 15:25:05
问题 Firstly, I am using the latest version of Oracle ApEx 4.1.1 and have the following standard report that has a checkbox selection so when clicked, would like to set another field with sysdate, including time. When unchecked, would like to reset to NULL the date set in my previous statement as well as a comments fields Report might look like: select id, name, telephone, apex_item.checkbox2(10,id) as "Tick when Contacted", apex_item.display_and_save(20,:P2_DATE) as "Date Contacted", apex_item

oracle disconnect behaviour

主宰稳场 提交于 2019-12-12 14:56:29
问题 What will happen if connection is lost during long operation? For example there is a select statement that takes several minutes to complete and connection is lost during its execution. Will it continue execution or will be stopped? For a delete statement: will it be executed to its finish or interrupted when client disconnects? What will happen to the data: will it be committed or rolled back, how soon? For a ddl operation: I have a long running alter table tbl_name move operation, what will

PLSQL: Possible to use BOOLEAN datatype in SQLPLUS? [duplicate]

徘徊边缘 提交于 2019-12-12 14:52:39
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to use BOOLEAN type in SELECT statement I have tried running SQLPLUS on functions I've written which return the BOOLEAN data type. Is there any way to run these BOOLEAN functions from SQLPLUS? It seems that the BOOLEAN data type is not accessible at all from SQLPLUS. EDIT: I should have mentioned I was only working with SQLPLUS bind variables, not the standard DECLARE... PLSQL variables. 回答1: The BOOLEAN

Create oracle table with auto commit on

a 夏天 提交于 2019-12-12 14:48:09
问题 Here is the scenario, I am writing a procedure which performs DML(insert,delete) operations on multiple tables. In case of exception I need to rollback data from most of the tables except one. Example: Procedure{ 1 Insert into table1 2 Delete from table2 3 Insert into Table3 4 Insert into table4 Commit; Exception Rollback; } If there is any exception in 4th Insert, I need to rollback all previous transaction except 3rd one. I know, commit/rollback doesn't work like that. But maybe is there

split records into buckets based on a sum of counts

微笑、不失礼 提交于 2019-12-12 14:07:42
问题 i have a table that looks like below. i need to find a way to pick out phone numbers based on a sum of counts (the number will always be different but let's use 130 for this example). So one of the solutions would be rows 1 through 5 and 11 (if you add up CountOfPeople values from those rows you will get 130). or 1-4,6,7,9,11,12. it doesn't matter which phone numbers are picked, as long as the total is 130. sometimes you might not be able to get exactly 130, so "as close as possible but not

Oracle PL/SQL - ORA-01403 “No data found” when using “SELECT INTO”

心不动则不痛 提交于 2019-12-12 12:22:00
问题 I have a pl sql code that execute three queries sequentially to determine a match level and do some logic The issue is - when first query has no results (completely valid scenario) I get ORA-01403 No data found. I understand that I need to incorporate [ Exception clause when NO_DATA_FOUND ]- but how to add it and continue to the next query? PL/SQL Code SELECT A into PARAM A FROM SAMPLE WHERE SOME CONDITION; -- GOT ORA-01403 No data found HERE MATCH_LEVEL =1; if A is null then do some logic;

Drop oldest partition automatically in oracle 11G

血红的双手。 提交于 2019-12-12 11:59:23
问题 I have a requirement to drop partition from an interval partitioned table, if the partition is older than three months. Is there a oracle utility/function to do this? Or if not, how to implement this? Please guide me. Database version: Oracle 11G 回答1: I don't know of any oracle utility or function to do this. You can find the information you need to write your own program to do this in the DBA_TAB_PARTITIONS or ALL_TAB_PARTITIONS views, similar to the following: SELECT TABLE_OWNER, TABLE_NAME

What does precision and scale means in the Oracle NUMBER data type

左心房为你撑大大i 提交于 2019-12-12 10:52:49
问题 I have been reading Beginners guide for oracle DB. The definition for precision and scale are quite confusing. Book says: number(6,3) Oracle allows for 2 not 6 significant digitalis. my problem is, 6 means precision. which means number of significant digits. so it should accept 6 significant digits. why does the book says it is 2 significant digits The book i am referring to is Oracle Database 11g A Beginner's Guide by McGraw Hill Professional, Dec 18, 2008, page number 12 回答1: Check out the

ORA-29283: invalid file operation ORA-06512: at “SYS.UTL_FILE”, line 536

别说谁变了你拦得住时间么 提交于 2019-12-12 10:40:45
问题 Below is the code i use to extract data from a table to a flat file. BEGIN DECLARE file_name VARCHAR2(50); file_handle utl_file.file_type; BEGIN file_name := 'table.txt'; file_handle := utl_file.fopen('SEND',file_name,'W'); FOR rec in( SELECT column 1 ||'~'||column 2 ||'~'||column 3 out_line FROM table1)LOOP UTL_FILE.PUT_LINE(file_handle,rec.out_line); UTL_FILE.FFLUSH(file_handle); END LOOP; UTL_FILE.FCLOSE(file_handle); END; end; This code is working fine in our development database but its