oracle

Reading from an write-only(OUT) parameter in pl/sql

When I tried writing to an read-only parameter(IN) of a function, Oracle complains with an error. But that is not the case when reading from an write-only(OUT) parameter of a function. Oracle silently allows this without any error. What is the reason for this behaviour?. The following code executes without any assignment happening to "s...

Cannot use a Like query in a JDBC prepared statement?

OK, first the query code and query: ps = conn.prepareStatement("select instance_id, ? from eam_measurement where resource_id in (select RESOURCE_ID from eam_res_grp_res_map where resource_group_id = ?) and DSN like '?' order by 2"); ps.setString(1,"SUBSTR(DSN,27,16)"); ps.setInt(2,defaultWasGroup); ps.setString(3,"%Module=jvmRuntimeModu...

The Microsoft Jet database engine cannot open the file '(unknown)'.

hi i am oracle DB. i am uploading keywords into the DB. but i am getting the error java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. at sun.jdbc.odbc.JdbcOdbc.createSQLE...

Obtain stored procedure metadata for a procedure within an Oracle package using ADO.NET

Hi, I am trying to obtain the stored procedure metadata (procedure name,parameter types,parameter names etc) for a procedure declared within an Oracle package, using the standard ADO.NET API - DbConnection.GetSchema call. I am using the ODP driver. I see that the Package is listed in the 'Packages' and 'PackageBodies' metadata collecti...

Oracle: How can I know a table is getting populated?

Hi, I'm in charge of an oracle db where we don't have any documentation (at all). And at the moment I need to know HOW a table is getting populated. Ideally, I'd like to know from which procedure, trigger, whatever... this table gets its data from. Any idea would be much appreciated. Thanks. ...

PreparedStatement and setTimestamp in oracle jdbc

Hi everyone, I am using PreparedStatement with Timestamp in where clause: PreparedStatement s=c.prepareStatement("select value,utctimestamp from t where utctimestamp>=? and utctimestamp<?"); s.setTimestamp(1, new Timestamp(1273017600000L)); //2010-05-05 00:00 GMT s.setTimestamp(2, new Timestamp(1273104000000L)); //2010-05-06 00:00...

What is the MLSLABEL Oracle datatype?

I've come across a strange datatype in oracle called MLSLABEL. It's not listed on datatype docs, and is only valid for 'trusted oracle' (whatever that is). The documentation I could find on it is this. What is MLSLABEL, and what does it do? ...

Oracle Training Providers

I'm looking to find an Oracle PL/SQL training course for a colleague of mine. I've had first-hand experience with Oracle University and was quite satisfied with my experience, but the courses currently available through Oracle University are limited to options out of our budget when considering travel and 5 days of hotel. I'm wonderi...

Oracle TIMESTAMP w/ timezone data type confusion

When would you use TIMESTAMP w/ timezone as opposed to TIMESTAMP w/ local time zone? When data is stored in a column of data type TIMESTAMP w/ local tz, the data is normalized to the database time zone, and the time zone displacement is not stored as part of the column data. When users retrieve the data, Oracle returns it in the users'...

Populating a table in a MSTest, NHibernate

using System.Collections.Generic; using DataLoader.Domain; using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTest { /// <summary> /// Unit test that reloads the database schema based on Hibernate mapping files. /// </summary> [TestClass] public clas...

Long to timestamp for historic data (pre-1900s)

I have a database of start and stop times that have previously all had fairly recent data (1960s through present day) which i've been able to store as long integers. This is very simialr to unix timestamps, only with millisecond precision, so a function like java.util.Date.getTime() would be the value of the current time. This has worke...

Oracle Triggers Query..

Lets consider a Table STUD and a ROW-Level TRIGGER is implemented over INSERT query.. My scenario goes like this, whenever a row is inserted, a trigger is fired and it should access some script file which is placed in the hard disk, and ultimately should print the result. So, is this thing is possible? and if yes, then this thing should ...

Differences between DB2 and Oracle

We had a talk with colleagues about databases yesterday as we will have a DB2 education in few weeks. I'm wondering, what are the differences between DB2 and Oracle as two major enterprise solutions? Are there any limitations in comparison to each other? Are there any tasks more suitable for DB2 or Oracle? (I found this article, but I s...

how to check whether a field has a value in Oracle

hi, How can I check whether there is a value set for a particular field in a table ? Thank You ...

oracle call stored procedure inside select

Hi everybody. I'm working on a query (a SELECT) and I need to insert the result of this one in a table. Before doing the insert I have some checking to do, and if all columns are valid, I will do the insert. The checking is done in a stored procedure. The same procedure is used somewhere else too. So I'm thinking using the same procedu...

array or list into Oracle using cfprocparam

I have a list of values I want to insert into a table via a stored procedure. I figured I would pass an array to oracle and loop through the array but I don't see how to pass an array into Oracle. I'd pass a list but I don't see how to work with the list to turn it into an array using PL/SQL (I'm fairly new to PL/SQL). Am I approaching ...

SQL: join within same table with different 'where' clause

Ok, so the problem I'm facing is this, I have a table with 3 columns : ID, Key and Value. ID | Key | Value ================ 1 | 1 | ab 1 | 2 | cd 1 | 3 | ef 2 | 1 | gh 2 | 2 | ij 2 | 3 | kl Now I want to select the value of Keys 1 & 3 for all IDs, the return should be like this ID | 1 | 2 ================ 1 ...

Oracle: what information can I derive from the SCN?

Given an SCN (system change number), and assuming an SCN for which the data is still in the undo logs, what information about the SCN can I derive? of course, SCN_TO_TIMESTAMP() gives an approximate time the data was committed. Is there any other information I can derive? What transaction, what tables, what data were affected? etc? ...

What is an Oracle Client ?

I'm from MySQL background and am new to Oracle. I want to know What is meant by Oracle Client? What is its use? What is its equivalent in MySQL ? Thanks ...

Select a row having a column with max value - On a date range

Excuse me for posting a similar question. Please consider this: date value 18/5/2010, 1 pm 40 18/5/2010, 2 pm 20 18/5/2010, 3 pm 60 18/5/2010, 4 pm 30 18/5/2010, 5 pm 60 18/5/2010, 6 pm 25 19/5/2010, 6 pm 300 19/5/2010, 6 pm 450 19/5/2010, 6 pm 375 20/5/...