oracle

mutating, trigger/function may not see it- error during execution of trigger

CREATE OR REPLACE TRIGGER UPDATE_TEST_280510 AFTER insert on TEST_TRNCOMPVISIT declare V_TRNCOMPNO NUMBER(10); CURSOR C1 IS SELECT B.COMPNO FROM TEST_TRNCOMPVISIT A, TEST_TRNCOMPMST B, TEST_MEMMAST C WHERE A.COMPNO=B.COMPNO AND B.TRNMEMID=C.MEMID AND C.MEMOS>=1000; begin open c1; fetch c1 into V_TRN...

LESS THAN OR EQUAL TO IN Oracle SQL

updated_date = 08-Jun-2010; I have a query like this select * from asd whre updated_date <= todate('08-Jun-2010', 'dd-MM-yy'); but i am not getting any result. it is wotking only if todate is 09-Jun-2010... ie my equalto operator is not working properly. y is it like that ny help? ...

Oracle OLEDB Connection Pooling and Invalid Connections

We are using ADO to access Oracle 10g release 2, Oledb provider for Oracle 10g. We are facing some issue with the connection pooling. The database reside on the remote machine and connection pooling is occuring as it should. But if the remote machine goes down for some reason, the connection is returned from the pool and query on that co...

How to prevent the symbol "&" from being replaced by "&amp;

Hi, Hoping someone could pls let me know how to prevent the symbol "&" from being replaced by "&amp;" within my URL, specifically within javascript? Just to expand on requirement, I am getting my url from an oracle database table, which I then use within Oracle Application Express, to set the src attribute of an iframe to this url. FY...

How does line numbering work in an Oracle trigger?

I have a trigger that's throwing an error, and I am not sure how to know which line of PL/SQL code is throwing that error. My error is [Oracle]ORA-01403: no data found ORA-06512: at "MYSCHEMA.FOO_BI", line 9 My trigger is something like this: create or replace TRIGGER "MYSCHEMA"."FOO_BI" BEFORE INSERT ON FOO REFERENCING OLD ...

UTF-8 - Oracle issue

Possible Duplicate: DBD::Oracle and utf8 issue I set my NLS_LANG variable as 'AMERICAN_AMERICA.AL32UTF8' in the perl file that connects to oracle and tries to insert the data. However when I insert a record with one value having this 'ñ' character the sql fails. But if I use 'Ñ' it inserts just fine. What am I doing wrong he...

JPA EclipseLink Auditing for Oracle issue with SessionCustomizer...

I was trying to use the SessionCustomizer for auditing with v$session.program for oracle and it works with JDBC but i need it working with JPA, so i read a bit more the documentation for SESSION_CUSTOMIZER in this site: http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#EclipseLink_JPA_Persistence_Unit_Properties_for_Customi...

Custom object based on database table

Suppose that I have a database query which looks like below - select name, gender, birthday from person where person_id = 1; When this query is executed, some records from the database is returned. I want to execute this query inside a function, then make a custom object which will contain the exact attributes as the column names, wi...

SQL Update help

I have a really simple question, is it possible to update a table with new values using just one update statement. Say for example I have a table with author, title, date, popularity. Now I got some new data which has author name, title corresponding new popularity. How do I update the table now in one statement. Note that author and ti...

How to cast a doubleto a decimal in Oracle SQL?

I am trying to cast a number, I think it is a double, to a decimal using the following: CAST(syr_ep AS decimal(10,3)) As EP which is still returning a double, so how do I achieve this? ...

how to display databases in oracle11g using sqlplus

in mysql its show databases; but how to show the available databases in oracle. can someone help ...

Join two Oracle queries

I've to query from two tables and want one result.. how can i join these two queries? First query is querying from two tables and the second one is only from one. select pt.id,pt.promorow,pt.promocolumn,pt.type,pt.image,pt.style,pt.quota_allowed,ptc.text,pq.quota_left from promotables pt,promogroups pg ,promotablecontents ptc ,promo...

how I can read a SEQUENCE and write it in text item?

Please help me!I dont know why i cant solve this simple problem. I wanna read my sequence that I made it in my database and add it to my text Item. any idea?(with code plz) right know I write a cursor and call my sequence by a select from it but i dont know what should I do after it :( ...

how I can get text of selected item in list item in oracle forms?

Hi List item involved List element and list item value. my list item value is different from their text I want to know how I can get the selected item text. (it same az combo box,i need the text of selected item) plz help me. ...

ORA-06502: PL/SQL: numeric or value error: character string buffer too small with Oracle aggregate functions

Good day gurus, I have a script that populates tables on a regular basis that crashed and gave the above error. The strange thing is that it has been running for close to 3 months on the production system with no problems and suddenly crashed last week. There has not been any changes on the tables as far as I know. Has anyone encounter...

how to change the delimiter in sqlplus in oracle 11g

I want to change the delimiter: Can someone help me to change the delimiter in sqlplus in Oracle 11g CREATE OR REPLACE TRIGGER test_trigger BEFORE INSERT ON test REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT test_sequence.nextval INTO :NEW.ID FROM dual; END; / this is the trigger I want to create. but after Select statement...

odp.net SQL query retrieve set of rows from two input arrays.

I have a table with a primary key consisting of two columns. I want to retrieve a set of rows based on two input arrays, each corresponding to one primary key column. select pkt1.id, pkt1.id2, ... from PrimaryKeyTable pkt1, table(:1) t1, table(:2) t2 where pkt1.id = t1.column_value and pkt1.id2 = t2.column_value I then bind the values...

Oracle - Count distinct values of a column

Hi I have this table: Reason|Area_Code|Id x dig 1 x dig 2 y dig 3 h util 4 x dig 5 I'm trying for a SQL that returns: Reason|Amount of distinct Reason|Area_code x 3 dig y 1 dig h 1 uti...

how to display table data more clearly. in oracle sqlplus

Here is the way sqlplus displays my table data: but I want to show them as Name | Address | -------+---------------+ name1 | address1 | name2 | address2 | name3 | address3 | ...

sqlplus remove \r \n \t from spool

Hi all, Is there any sql*plus command to remove \r \n and\t from the result set that's going out to the spool file? That is, "trim" every record? We've used set trim on in the past, but it doesn't seem to bue what we need right now. I'm trying to avoid calling oracle's translate, chr functions in the sql query. For example, set term...