oracle11g

java connect to backend explanation

℡╲_俬逩灬. 提交于 2019-12-12 01:50:21
问题 I am super newer in java language. Now i am getting started java. I am keen interst know about how to connect java with back end. For that I have been installed oracle 11g express edition and sql developer. First of all i just confused here, is these two tools are (oracle 11g express edition and sql developer.) enough for connect java with back end.? And i am using jdk1.8.0_25 and eclipse editor. If yes, means, what are the further process to achieve? Already i know little bit about php, i

Convert each character in a string to a row

三世轮回 提交于 2019-12-12 01:38:08
问题 I have a column which contains a String with numbers like '12345' (no separator or blanks) and I want to split this column to rows for each character: From: COLUMN ------------------ 12345 To: COLUMN ------------------ 1 2 3 4 5 This Should work in a single select so that I can use it like this: ... AND WHERE SOMECOLUMN NOT LIKE ( ... THE SELECT ... ) 回答1: with temp as (select '12456' as str from dual) select substr(str,level,1) from temp connect by level <= length(str); Result: 1 2 4 5 6 来源:

Accessing the Custom Object Return type from ojdbc6 JDBC Thin Drivers

巧了我就是萌 提交于 2019-12-12 01:33:28
问题 I'm writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has a Custom Object return type. I can get the code to call the procedure, but how do I access the returned Custom Object to obtain it's contained values?. An example of my code calling the procedure is below: PLSQL Code: Procedure GetDataSummary (p_my_key IN KEYS.MY_KEY%TYPE, p_recordset OUT data_summary_tab, p_status OUT VARCHAR2); Java Code: String query = "begin manageroleviewdata.getdatasummary(?, ?, ?); end;");

Configuring UTL_MAIL Package Prerequisites

旧街凉风 提交于 2019-12-12 01:19:28
问题 I was trying to configure my system to send mail using UTL_MAIL package but no luck .. I read that I need to configure ACL first. hence I did. But even doing so it's not working still. SELECT * FROM dba_network_acls; begin dbms_network_acl_admin.create_acl ( acl => 'utl_http.xml', description => 'HTTP Access', principal => 'HR', is_grant => TRUE, privilege => 'connect', start_date => null, end_date => null ); dbms_network_acl_admin.add_privilege ( acl => 'utl_http.xml', principal => 'HR', is

socket connection

二次信任 提交于 2019-12-12 01:15:19
问题 I would like to send a string via a socket to an external display unit via the oracle 11g database I gather that the character or string first has to be converted to hex and at the end of the string a checksum must be addead (to validate the string to be sent) Can anyone tell me how a socket connection can be opened and a string can be sent? Thank you 回答1: DECLARE bt_conn UTL_TCP.connection; retval BINARY_INTEGER; l_sequence VARCHAR2 (50) := '@0100010303000118000201001401000201'; --string to

Oracle 11g Express error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor

故事扮演 提交于 2019-12-12 01:12:13
问题 I am facing problem with Oracle 11g Express hosted on Linux Centos 6.4. This server is relocated from one place to another, this relocation changes the IP of server. We have changed the IP in tnsname.ora and listerner.ora files. After these changes when we are trying to connect to database instance from server we are getting error “Connected to idle instance”. If we are trying it to connect from client using SQL developer we are getting error “Status : Failure -Test failed: Listener refused

Oracle external table date field - works in one DB and not in another

。_饼干妹妹 提交于 2019-12-12 01:02:05
问题 Here's a crazy one: the same external table definition works fine in one database, but fails in another. Not schema - database. Two databases, both on the same OS, different servers. In addition, it's failing on the 2nd date field, though both are defined the same. The NLS settings are the same on both servers, thought I thought the date mask should override that anyway. Here's the definition: -- access parameters -- http://docs.oracle.com/cd/E11882_01/server.112/e16536/et_params.htm CREATE

java.lang.UnsupportedOperationException: org.hibernate.dialect.Oracle10gDialect does not support resultsets via stored procedures

怎甘沉沦 提交于 2019-12-12 00:46:58
问题 how to solve the following error I am using JPA 2.1 widfly Application Server 8.0 and Oracle 11g bd java.lang.UnsupportedOperationException: org.hibernate.dialect.Oracle10gDialect does not support resultsets via stored procedures Deputy code: StoredProcedureQuery storedProcedureQuery=em.createStoredProcedureQuery("SIB_PQ_SENA.CREAR_VENTAS",Venta.class); storedProcedureQuery.registerStoredProcedureParameter("P_ID_EMPLEADO", Integer.class , ParameterMode.IN); storedProcedureQuery

Fetching Columns of a multiple rows in one row

柔情痞子 提交于 2019-12-12 00:44:41
问题 I have a DB table with records as shown below, ID ATTR_NAME ATTR_VALUE 1 ABC DEF 1 GHI JKL 1 MNO PQR I would like to get a single row as ID ABC GHI MNO 1 DEF JKL PQR 回答1: It may be a little fragile and not that future proofed, but Pivot can give you what you want: SELECT * FROM ( SELECT attr_name, attr_value FROM test ) PIVOT ( MIN(attr_value) FOR attr_name IN ( 'ABC','GHI','MNO' ) ) However, I'd advise that you consider if you really need it in that format and see if you can get it out in a

Oracle 11g selecting/inserting multiple max values with one script

非 Y 不嫁゛ 提交于 2019-12-12 00:26:57
问题 I am having trouble selecting/inserting multiple max values with one script. The following table is made up to represent the combination of values with the tables I am trying to work with. The script needs to be an insert statement to insert the returned values into a second table. CREATE TABLE family ( state VARCHAR2(2 BYTE), Birth date, Married date, Shirt size number(10 ) Shoe size number(10), Hair VARCHAR2(80 BYTE), carname VARCHAR2(24 BYTE), CATname VARCHAR2(24 BYTE), Hometown VARCHAR2