oracle11g

ERROR: ORA-02289: sequence does not exist - org.hibernate.exception.SQLGrammarException: could not extract ResultSet

社会主义新天地 提交于 2020-01-03 08:21:48
问题 I am creating a basic hibernate application for employee table in which I am adding, updating, deleting and displaying the record with the help of ManageEmployee class. Actually, ManageEmployee is my test class and i am using Employee.java and Employee.hbm.xml file to do above things. Details: Database: Oracle 11 g Hibernate version: hibernate-release-4.3.8.Final Java Version: Java 1.8 Employee Table Details: USER_ID NUMBER(15,0) No 1 1 FIRST_NAME VARCHAR2(20 BYTE) Yes 2 LAST_NAME VARCHAR2(20

How to view blob data in Oracle SQL Developer

情到浓时终转凉″ 提交于 2020-01-03 07:39:07
问题 How can I read blob data in Oracle SQL Developer. It is stored in byte[] format. Is there any possibility to read in string format. 回答1: Follow these steps in Oracle SQL Developer - Open data window of your table. The BLOB cell will be named as (BLOB) . Right click the cell. You will see a pencil icon. Click on it. It will open a blob editor window. You would find two check boxes against the option View as : Image or Text . Select the appropriate check box. If above step is still convincing,

Confused with dbms_xplan.display

扶醉桌前 提交于 2020-01-03 05:50:07
问题 I'm using oracle 11g. Just started practicing index. For this i just created a table with 10000000 rows. With out creating index i searched for 4568754th record, in the explain plan it was displaying 28 rows only. My doubt: Oracle will do sequential search if we wont' create any index on the table. In the above example searched rows should be 4568743 but why it was showing 28 only? After creating unique index it has searched only 1 row. I can see the diff in %CPU and time taken to execute but

PL/SQL Update values using DUP_VAL_ON_INDEX

痞子三分冷 提交于 2020-01-03 05:31:20
问题 DECLARE ins NUMBER := 0; upd NUMBER := 0; CURSOR c1 IS SELECT cid FROM tbl_cust WHERE cid IN ('1','2','3','4'); BEGIN FOR rec IN c1 LOOP INSERT INTO tbl2 (id_tbl2, name_tbl2) VALUES(rec.cid, DECODE(rec.cid, '1', 'A', '2', 'B', '3', 'C', '4', 'D')); ins := ins + 1; END LOOP; dbms_output.put_line('Updated: ' || ins); dbms_output.put_line('Inserted: ' || upd); EXCEPTION WHEN DUP_VAL_ON_INDEX THEN FOR rec IN c1 LOOP UPDATE tbl2 set name_tbl2 = DECODE(rec.cid, '1', 'A', '2', 'B', '3', 'C', '4', 'D

Oracle outer join with filter condition on the second table

巧了我就是萌 提交于 2020-01-03 05:23:29
问题 Is there any condition under which the result sets will be different from the following two statements? select * from a,b where a.id = b.id and b.name = 'XYZ' select * from a,b where a.id =b.id(+) and b.name = 'XYZ' I think in both cases it will bring the common rows from a and b where b.name = 'XYZ' . So a.id = b.id(+) has no meaning. 回答1: No, there is no condition under which the result sets will be different. But your assumption " a.id = b.id(+) has no meaning" is not 100% correct. It has

Calling member procedure NULL SELF argument Oracle

安稳与你 提交于 2020-01-03 02:32:05
问题 I have a type myType declared with a member procedure insert_obj . When i try this code, i get the following error: declare v_obj myType; begin v_obj.insert_obj(1,2,3); end; ORA-30625: method dispatch on NULL SELF argument is disallowed I am assuming this is because i have no object on which to call the method... but i cannot do select value(a) into v_obj from myTable because the table is empty (and i want to insert into it). How then do i get an object to call my method on? Thanks 回答1: You

Pass value stored in a PL/SQL variable into an IN clause

为君一笑 提交于 2020-01-02 16:09:14
问题 I have the code as follows: DECLARE vr_arr_list VARCHAR2(100) := `7,3,4'; BEGIN FOR CX IN (Select ID, NAME from TBL_DEMO where ID IN (vr_arr_list)) LOOP DBMS_OUTPUT.PUT_LINE(CX.ID || '-' || CX.NAME); END LOOP; / I had also tried using DBMS_UTILITY.comma_to_table (list => REGEXP_REPLACE (vr_arr_list, '(^|,)','\1x'), tablen => l_ID_count, tab => l_ID_array); But passing the array l_ID_array also didn't work. Kindly assist. 回答1: Another way is to make use of Nested tables in conjunction with

Pass value stored in a PL/SQL variable into an IN clause

妖精的绣舞 提交于 2020-01-02 16:07:09
问题 I have the code as follows: DECLARE vr_arr_list VARCHAR2(100) := `7,3,4'; BEGIN FOR CX IN (Select ID, NAME from TBL_DEMO where ID IN (vr_arr_list)) LOOP DBMS_OUTPUT.PUT_LINE(CX.ID || '-' || CX.NAME); END LOOP; / I had also tried using DBMS_UTILITY.comma_to_table (list => REGEXP_REPLACE (vr_arr_list, '(^|,)','\1x'), tablen => l_ID_count, tab => l_ID_array); But passing the array l_ID_array also didn't work. Kindly assist. 回答1: Another way is to make use of Nested tables in conjunction with

wrong number or types of arguments in call to my procedure

自闭症网瘾萝莉.ら 提交于 2020-01-02 07:51:08
问题 hi I wrote this code to create a procedure to return a Boolean value based on the if conditions but when I execute it I got this error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'DDPAY_SP' ORA-06550: line 1, column 7: PL/SQL: Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: here is my procedure create or replace procedure DDPAY_SP ( donor_id dd_donor.iddonor%type, pldgstatus out dd

what is the reason for core dump? stack shows from oracle lib

爷,独闯天下 提交于 2020-01-02 06:40:27
问题 I have a coredmp where all thread stack look normal but one stack shows like this. Can any one tell me possible reason for this? i can see exit is being called from oracle libs, is this issue of oracle? Can any one guide me when this can happen? Thread 3 (process 26454): #0 0x00002b803ceb54a8 in exit () from /lib64/libc.so.6 #1 0x00002b803bbe93f5 in skgdbgcra () from /home/oracle/product/11g/lib/libclntsh.so.11.1 #2 0x00002b803be9cdec in kpeDbgCrash () from /home/oracle/product/11g/lib