oracle

Problem with trigger in oracle

I'm new in oracle and i don't know what is wrong with this trigger: CREATE OR REPLACE TRIGGER "propuesta_casas" BEFORE INSERT ON "PROPUESTA_TIENDA_BARRIO" FOR EACH ROW WHEN (new."CASASCAL" IS NULL) BEGIN SELECT PROPUESTA.CASAS INTO :new."CASASCAL" FROM PROPUESTA WHERE PROPUESTA.IDPROPUESTA=new.IDPROPUESTA ; END; / Er...

JBoss database connection pool auto-commit behavior

We are using JBoss 4 and Oracle with a JNDI datasource configured via JBoss datasource XML file. Recently realized that all connections acquired from the datasource by default has the auto-commit property set to true. However, we rely on Oracle stored procedures and want to control the commits within the stored procedures. We use plain...

Indexed Table DML Performance when you dont use index

Hi All, I am running some performance tests about indexes and DMLs. I could not understand some test result in the case of when you do not use indexes on an indexed table DMLs perform slower than the non-indexed tables. I was expecting to run the both in similar time intervals. The plsql block i used is below:(TINDEX_PERFORMANCE_TEST_1 ...

getting class not found exception

Hi friends i am facing the following error while trying to connect to a database through java code: Exception in thread "Main Thread" java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.example.model.Driver.main(Driver.java:13) My java ...

Oracle query problem

Please let me know why this query is not working together. They are working separately: ( (select item_name, sum(p_qty) from stock where p_date between '08/06/2010' and '08/07/2010' group by item_name) - ( select item_name, sum(p_r_qty) from stock where p_r_date between '08/06/2010' an...

Oracle active/active architecture

I look for solutions that can synchronize data between two different geographical sites. This solutions must synchronize data online or with minimum delay What's the best solution for this architecture? which existing solutions on the market? ...

Update/ Retrieve /Inserting date field

Hello All, I am having difficulties while updating a date field into the Database. The field type in the DB is Date/Time. Now, I am trying to update the field name "R_Date". Currently, I am using the SQL Expression in my jsp" UPDATE request SET request_date ='"+Request_Date+"'"; , But it is not accepting. In the select statement I am...

SQL to query the maximum number of available items for a specific period (reservation system)

For a reservation system there is an inventory table and each item has a quantity (e.g. there are 20 chairs). Now the user can make a reservation for a specific period (e.g. 5 chairs for two hours "2010-11-23 15:00" - "2010-11-23 17:00"; another reservation could be for several days "2010-11-24 11:00" - "2010-11-26 14:00"). What's the b...

SQL finding person entry has the most dogs

person(id, dogs) how would I find the person with the most dogs select * from person p1 where p1.id in ( select p2.id from person p2 where p1.id = p2.id having count(dogs > ( select p3.id ...etc am I on the right track or will this not work? thanks for taking a look ...

What's the most efficient way to check if a record exists in PL/SQL?

A) select decode(count(*), 0, 'N', 'Y') rec_exists from (select 'X' from dual where exists (select 'X' from sales where sales_type = 'Accessories')); B) select decode(count(*), 0, 'N', 'Y') rec_exists from (select 'X' from sales where sales_type = 'Accessories'); C) ...

how to learn Oracle 11ie for ERP support

is there a free version I can install to practice and study? Are there any other good resources? ...

Is there MySQL example database like in Oracle?

Sometime ago, when I installed Oracle on Ubuntu, there was a sample database. Database contained Employees, Departments, ... Now I wonder is there something similar for MySQL? ...

(Oracle) how to group rows for pagination

I have a table that outputs similar to this (although in thousands): EMPNO ENAME TRANDATE AMT ---------- ---------- --------- ------- 100 Alison 21-MAR-96 45000 100 Alison 12-DEC-78 23000 100 Alison 24-OCT-82 11000 101 Linda 15-JAN-84 16000 101 Linda 30-JUL-...

REP-1216 | print condition error

i face this problem in oracle Report Builder REP-1216 anybody can explain ?? ...

What to grant to user to use index of table while quering?

I want to know if oracle uses index when user queries data from table and that user has been granted just: grant select on table to user I want to know if it is needed some another grant to use index... ...

What is the difference in rebuilding an index on index-organized table and an ordinary table?

From this article about index organized tables, Note that rebuilding a secondary index on an index-organized table involves reading the base table, unlike rebuilding an index on an ordinary table. Why does rebuilding of an index on an ordinary table not require reading the base table? ...

Where is the ROWID fetched from when queried?

For example, if I do SELECT ROWID, name from emp where age > 30; As ROWID does not take any storage space, is it calculated every time a query like this runs? From here, Each table in an Oracle database internally has a pseudocolumn named ROWID. This pseudocolumn is not evident when listing the structure of a table by ...

Trigger is invalid and failed re-validation

Here is the code that I use to create a table, a sequence and a trigger DROP TABLE CDR.ExtDL_JobStatus; -- -- TABLE: CDR.ExtDL_JobStatus -- CREATE TABLE CDR.ExtDL_JobStatus( Id NUMBER(38, 0) NOT NULL, ShortName NUMBER(38, 0) NOT NULL, Description NUMBER(38, 0) NOT NULL, CONSTRAINT PK_ExtD...

How to pull DataSet from Oracle in .NET?

Hello, I am a seasoned .NET / SQL Server developer. I just started a new contract where client is using Oracle, which i've no experience in. I'm trying to create a WinForms application that will need to talk to the Oracle DB. My frst step was creating a ORacle querying API (which I normally would do in a new MS SQL based project).. I w...

get string from right hand side

I am writing a query in Oracle. I want to get a string from the right hand side but the string length is dynamic. Ex: 299123456789 I want to get 123456789 substr(PHONE_NUMBERS,-X,Y) X is different for each record. I tried this: substr(PHONE_NUMBERS,-length(PHONE_NUMBERS),Y) and it didn't work.. How can I write this query? Th...