oracle11g

using nested_tables in java

▼魔方 西西 提交于 2019-12-13 05:28:30
问题 How do I receive a nested table in java from pl/sql procedure's OUT parameter? Here is my example code. Connection connection = utilities.getConnectionToDb(); CallableStatement callableStatement = connection.prepareCall("{call procedure_name(?,?)}"); callableStatement.setLong(1, 23456); callableStatement.registerOutParameter(2, Types.ARRAY); callableStatement.executeQuery(); But when I try executing it I get the error PLS-00306: wrong number or types of arguments in call to 'procedure_name' I

SQL Developer: Joining tables from connected SQL Server DB and connected Oracle DB

江枫思渺然 提交于 2019-12-13 05:23:37
问题 We are migrating from SQL Server 2005 to Oracle 11G. I have been trying to do an update to a table in Oracle using data stored in a table in SQL Server. Using SQL Developer, I have completed the following: Created a connection to the Oracle Database Created Connection name --> e9_crp Supplied User name and Pass Defined Host Name and SID I also created a connection to the SQL Server that contains the reference data Connection Name --> sql_data User Name and Pass Host and Port The connection

How to apply kind of loop for this Oracle query?

流过昼夜 提交于 2019-12-13 05:19:17
问题 I have a query that was developed using Oracle. I want update the same column '5' times. below the query that i developed: MERGE INTO product pr USING( SELECT pr.uuid, xmltype(pr.attributes_de_de).extract('//attr[@name = "SellingPoint1"]/string/text()') AS sellingpoint1, xmltype(pr.attributes_de_de).extract('//attr[@name = "SellingPoint2"]/string/text()') AS sellingpoint2, xmltype(pr.attributes_de_de).extract('//attr[@name = "SellingPoint3"]/string/text()') AS sellingpoint3, xmltype(pr

i have installed oracle 64 bit client on my laptop ..toad isn't working ..and is there a utility like SQL*Plus the older version?

拟墨画扇 提交于 2019-12-13 05:12:19
问题 sqlplus command line utility is working fine but i need to copy commands edit them rerun them command prompt is little bit of a hindrance for that matter ..i have downloaded the sql instant client 32 bit and don't know how to proceed further in the installation of it. 回答1: It sounds like your installation of the client is not complete. Uninstall and try installing the oracle client again. As for a gui sqlplus, it is now called sql developer. It can be downloaded here. 来源: https:/

ORA-00904: : invalid identifier while table creation

余生长醉 提交于 2019-12-13 05:11:22
问题 CREATE TABLE T_Option_Details ( Option_Id NUMBER(2), Question_ID INTEGER NOT NULL, Option VARCHAR2(500) NOT NULL); Error at line 3 ORA-00904: : invalid identifier 回答1: OPTION is an oracle reserved keyword, Try with some other column name like this, CREATE TABLE T_Option_Details( Option_Id NUMBER(2), Question_ID INTEGER NOT NULL, OPTION_N VARCHAR2(500) NOT NULL) 来源: https://stackoverflow.com/questions/20208918/ora-00904-invalid-identifier-while-table-creation

Limitation on IN()

让人想犯罪 __ 提交于 2019-12-13 05:10:34
问题 What is the limitation of number of values that are passed inside IN() in SQL query? I have been looking around about this online but not found the answer I was looking for? 回答1: When explicitly stated the limit is 1,000, i.e.: select * from the_table where id in (1, 2, ..., 1000) This is in the documentation on the IN conditon: You can specify up to 1000 expressions in expression_list. When not explicitly stated there is no limit: select * from table1 where id in ( select id from table2 )

Oracle 11g on Mac OS X

青春壹個敷衍的年華 提交于 2019-12-13 04:47:19
问题 I need to install Oracle Database on Mac OS X. I recently developped a NodeJS application using MySQL and now, I need this one to be compatible with Oracle, this is why I need Oracle Database on my Mac OS X, I will developped the Oracle version of the application... What's the best way to install Oracle on Mac OS X? I tried to install Oracle using this page : http://www.oracle.com/technetwork/apps-tech/intel-macsoft-096467.html Installed package : Version 11.2.0.4.0 (32-bit) Instant Client

Buffer too small for CLOB to CHAR or BLOB to RAW conversion

血红的双手。 提交于 2019-12-13 04:45:12
问题 I have written this script and now get an error that "Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 68579, maximum: 4000)". How can I fix this? set serveroutput on; Declare match_count Number :=0; v_from NUMBER(19) :=2019030651; CURSOR s is (SELECT owner, table_name, column_name FROM ALL_TAB_COLUMNS where owner LIKE 'SOMETHING_%' ); begin for t in s LOOP begin EXECUTE IMMEDIATE 'SELECT count(*) FROM '||t.owner || '.' || t.table_name|| ' WHERE '||t.column_name||' LIKE :1

Print Oracle PLSQL OUT variable

有些话、适合烂在心里 提交于 2019-12-13 04:42:49
问题 create or replace package demo_pckg as type cursor_type is ref cursor; procedure demo_proc(i_deptno number,o_result out cursor_type); end; / create or replace package body demo_pckg as procedure demo_proc(i_deptno number,o_result out cursor_type) as begin open o_result for select * from employees where department_id=i_deptno; end; end; / What should I do in case I want to print that OUT cursor variable ? 回答1: The simplest way from SQL*Plus or SQL Developer is with variable and print: var

Different dates Oracle 11g with TOAD

*爱你&永不变心* 提交于 2019-12-13 04:29:30
问题 I have the following queries: SELECT to_date(to_char(to_date('01-FEB-1949'))) FROM DUAL; /*this returns 2/1/2049. */ SELECT to_date(to_char(to_date('01-FEB-1949'),'dd-MON-yyyy')) FROM DUAL; /*this returns 2/1/1949.*/ Why does the first one returns the year 2049 instead of 1949 ? By Googling I have found that I can "force" the client date format to be the one desire by changing the key on the registry: KEY_OraClient11g_home1 NLS_DATE_FORMAT : YYYY/MM/DD 回答1: You're doing multiple implicit date