oracle10g

strange issue with JPA

Hello everyone, I have an strange issue here. I´ve got a JSF page which calls a webservice, in that call a Load entity is created. After that from the page I insert some Files, Load has a relation 1--> N with the files. After that I call the webservice to create a timer for making a few task with those services. If I do that way JPA ...

How do I clear a table with a lot of references in oracle?

For instance, suppose I have table A. Then I have tables B-Z that have a foreign key to table A's primary key. Then perhaps there are also some tables that have a foreign key constraint to a table in B-Z's primary key constraint. Is there any easy way to clear out table A and all of the tables that refer to A (or that refer to a table...

Oracle comparison issue

I'm trying to compare two columns from different columns. Ex: Select a.Col1, b.Col1, CASE WHEN a.Col1 <> b.Col1 THEN 'TRUE' ELSE 'FALSE' END CASE FROM TableA a LEFT OUTER JOIN TableB b ON a.id = b.id I always get false but not true even though they are different or if there is a value in TableA and not in TableB. What is wrong with ...

Get Started with Oracle Express Edition?

Hi! I'm novice in oracle.I'm using oracle express 10.2.0 but i don't know how to create my own database and where my database is created.(The path of my new database). ...

How can I monitor SQL activity on Oracle?

I'd like to find a tool for Oracle that is similar to the SQL Server Profiler, but a cursory search hasn't yielded any good results. I just want to see, in real time, the queries that my application are making against the database. Any suggestions? ...

Very frustrating ORA-12154 excpetion finally resolved!

This is a little something I thought I need to share. We had some issues establishing connection to Oracle. We kept getting the ORA-12154 (TNS:could not resolve the connect identifier specified) without any apparent reason. The weirdest thing was that in some application the connection was successfully established, while it kept throwin...

how to show only the time in oracle ?

I have table that has date field. When I run a query, I see this: 01/10/2009 22:10:39 How can I retrieve only the time (IE: 22:10:39) ...

Modifying an Oracle Ref Cursor

Given: Oracle 10.2g is the database I have a table called emp. emp has a VARCHAR2 column called SECRET. SECRET might contain a plaintext string, or it might contain an encrypted string, but I can distinguish one from the other A function called DECRYPT already exists that, given the encrypted string, will return an unencrypted string. H...

Degraded performance of a query after adding Index

Hi, I have a query which part of a SP which is executed fairly regularly, and the query took a while to execute, so I decided to have a look at it. I did an autotrace on the query, and this was the execution plan returned [ pasted in pastebin due to excessive size ] I added indexes on the tables which was undergoing full table access,...

Oracle 10g : Monthly stats with grouping by file size

I am on Oracle 10g. I have a table that contains all the files stored in the system during the past year. I want to make statistical monthly deposits, grouping them by file size. eg 0-1m 1m-10m 10m-100m 100m + So my results would look like : Month, 0-1m, 1m-10m, 10m-100m, 100mplus 2009-03, 999, 999, 999, 999 I want to use Oracle's ...

PL/SQL private object method

I'm a bit new to Oracle's PL/SQL (using 10g), I was wondering if there's a way to make a private method in an object type, as is often done for private helper methods in other languages (Java, C++, C#, etc...). I know it is possible to make private methods in packages, but I can't seem to find a way to do this for object types. I keep ge...

how to know if between 2 date's it past 5 days - Oracle 10g ?

I have two date's: 1) 01/05/2009 2) 06/05/2009 How can I know if there's 5 days between them? ...

Insert into oracle database

Hi I have a database with loads of columns and I want to insert couple of records for testing, now in order to insert something into that database I'd have to write large query .. is it possible to do something like this INSERT INTO table (SELECT FROM table WHERE id='5') .. I try to insert the row with ID 5 but I think this will create...

Oracle SQL query question

I want to extract data from database where field "end_ date" is less than today's date and where end_date is not equal to null; how would I do that? I figured the second part out .. I have trouble with first part select * from table where to_char(end_date) IS NOT null ...

Oracle - difference or changes between two rows from two tables

I have two tables both have same schema, one will have previous day records other will have current. I want to compare both and find only changes or only rows that have different value in atleast one column. How is this possible in pl/sql, oracle? (I did code something similar using checksum in T-SQL but not sure how to do in pl/sql) ...

how to run query that contain ( ' ) ? ex: select * from A where B like 'aa'bb' ??

Hi How do I run a query that contains ( ' ) ? For example: select * from A where B like 'aa'bb' Working on Oracle 10g Thanks in advance ...

Selecting transactions as a single row

Hey all, I have a requirement where I need to generate a report about current software projects. Two of the columns are the date of the latest milestone and the date of the milestone previous to that. Obviously, milestones are stored in a transaction table so we can have many milestone per project. I've gotten to here so far, but now...

Oracle 10g express home page is not coming up

Hello All: My Oracle 10g Express Edition , I can login in the SQL plus but I cannot login into oracle via SQL developer and cannot view the Home page at link http://127.0.0.1:8080/apex. This was working fine until yesterday. I have checked via (WINDOWS)netstat -ab and no other app is using the 8080 port. The only thing I did today was...

Oracle 10g EX / NCLOB - seems NLS_NCHAR_CHARACTERSET is ignored?

I am running Oracle Database 10g Express Edition Release 10.2.0.1.0 in a dev environment with the following NLS settings: NLS_CHARACTERSET WE8MSWIN1252 NLS_NCHAR_CHARACTERSET AL16UTF16 Used clients are either PHP with oci8 extension or the Oracle SQL Developer, using both ended up in this behaviour which I don't understand: I had rece...

how to use alias field in query ? (oracle 10g)

hi i writ thie query: select Fname,Age*2 as Demo from Men where Demo = 5 i get error - ORA-00904 (Demo not identified ) how i can use it ? thank's in advance ...