oracle11g

Connect oracle 11g database using java 1.7

对着背影说爱祢 提交于 2019-12-11 01:27:33
问题 Please help me.I have installed Oracle 11g on Windows 7 (32 bit) and i'm trying to connect database with jdk 1.7 but i get an error saying package oracle.jdbc.driver does not exist Oracle 11g is installed in E: Drive. I have pointed my Path and CLASSPATH as following CLASSPATH C:\Program Files\Java\jdk1.7.0 E:\app\malisa\product\11.2.0\dbhome_1\jdbc\lib The following jar files are in the location E:\app\malisa\product\11.2.0\dbhome_1\jdbc\lib ojdbc5 ojdbc5_g ojdbc5dms ojdbc5dms_g ojdbc6

Passing arguments inside procedure (message) not working - oracle

不问归期 提交于 2019-12-11 01:03:27
问题 I want to create a procedure but i am having trouble while passing the arguments inside a function This is my code: select 'The concurrent '||program||' with request_id '||request_id||' ended with status '|| status as message, request_id from ( <the subquery> ) where rn = 1 and status in ('WARNING','ERROR','STAND BY'); It works just fine and everytime it runs i got this output: |The concurrent Sales with request_id 987987678 ended with status WARNING|987987678 Now, i want to create a

Oracle Connection in C# - connection string

£可爱£侵袭症+ 提交于 2019-12-11 00:26:37
问题 I'm currently trying to build an application in C# and connecting it to a live db running in Oracle 11g. I have the following connection details Host IP: 10.204.1.3 Port: 1521 DB Name: PROD My source code string connString = "DATA SOURCE=10.204.1.3:1521/PROD;PERSIST SECURITY" + "INFO=True;USER ID=username; PASSWORD=userpass"; OracleConnection conn = new OracleConnection(connString); conn.Open(); I was able to add a connection in Server Explorer with the Connection String used by VS but is

DELETE row based on the column value

六眼飞鱼酱① 提交于 2019-12-11 00:10:02
问题 Is there a way for me to delete rows based on the value it contains? For example, I have a table with values in one column containing a URL value, for example, /uk/quitclock/om2.asp /uk/quitclock/om666.wav Here, I need to delete rows with suffixes ending with WAV, GIF, or JPEG. How do I do that? If it's not possible, then is there any formula in excel that can help me do it? 回答1: Try this on Database DELETE FROM TABLE WHERE UPPER(COLUMN) LIKE '%.WAV' OR UPPER(COLUMN) LIKE '%.GIF' OR UPPER

Selecting delimited string as a table in Oracle sql

随声附和 提交于 2019-12-10 23:48:01
问题 I have a string like: "Width:10|7|20|45,Height:25|5|6|45,Length:35|6|3|4" I'm looking to write a select query to select this as a table like: Width | Height | Length ----------------------- 10 | 25 | 35 7 | 5 | 6 20 | 6 | 3 45 | 45 | 4 Please comment if you need any more information. 回答1: This solution works with an arbitrary number of columns (width, height, ...) and values. -- your test data with data(val) as (select 'Width:10|7|20|45,Height:25|5|6|45,Length:35|6|3|4' from dual), -- split

Oracle - concatenating string with result of utl_raw.cast_to_varchar2 function

眉间皱痕 提交于 2019-12-10 22:50:22
问题 I am trying to concatenate a string to a result of utl_raw.cast_to_varchar2 function (which is also a string). It is supposed to be transparent, but I wasn't able to append anything to a result of utl_raw.cast_to_varchar2 . Here is an example: select utl_raw.cast_to_varchar2((nlssort('"' || CITY_NAME || ', ' || STATE_CODE || '"', 'nls_sort=binary_ai'))) || ' test' from (select 'New York' as CITY_NAME, 'NY' as STATE_CODE from dual) I expect the result to be "new york, ny" test but I only get

“ORA-00932: inconsistent datatypes: expected NUMBER got NCLOB” error when trying to save large xml using the Entity Framework

五迷三道 提交于 2019-12-10 20:32:08
问题 I get the following error when I try to insert new record with large xml into the oracle table with XmlType column using ADO.NET Entity Framework. Oracle.DataAccess.Client.OracleException Message=ORA-06550: line 5, column 22: PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got NCLOB ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored The data type of the property mapped to this column is string. However when I try to insert a small xml it saves it without any problem. 回答1:

Oracle 11g - add new column and set as unique

瘦欲@ 提交于 2019-12-10 20:15:54
问题 I am facing a problem on how to set a new column to unique using Oracle 11g. I try to use this code but it getting error: ALTER TABLE QAS_ASSIGNED_STATE ADD UNIQUE (cuid); 回答1: You should define column's type. Like this: alter table QAS_ASSIGNED_STATE add cuid number NULL; and then add constraint: ALTER TABLE QAS_ASSIGNED_STATE ADD CONSTRAINT constraint_cuid UNIQUE (cuid ); 来源: https://stackoverflow.com/questions/36030261/oracle-11g-add-new-column-and-set-as-unique

How to Insert Blob Datatype Values in Oracle 11g Database Through SQL*Plus

我是研究僧i 提交于 2019-12-10 20:14:34
问题 I have created a table with Blob datatype but I do not know how to insert values into the table or view the table content using SQL*Plus. Please help me. 回答1: It depends on what kind of data you want put into a BLOB. Let's consider the table: create table b1(id number , b blob); If your data represented as hex-string you should use TO_BLOB function insert into b1 values(1,to_blob('FF3311121212EE3a')); SQLPLUS also shows BLOBs as hex-string select * from b1; ----- -----------------------------

Oracle jdbc driver: implicit statement cache or setPoolable(true)?

女生的网名这么多〃 提交于 2019-12-10 19:49:12
问题 Oracle JDBC driver 11.2.x: Should I rely on the implicit statement cache or should I invoke setPoolable(true) on each created Statement? What are the differences, advantages and disadvantages of both methods? 回答1: Statement caching improves performance by caching executable statements that are used repeatedly, such as in a loop or in a method that is called repeatedly. When you enable implicit Statement caching, JDBC automatically caches the prepared or callable statement when you call the