What is the fastest in an ORACLE database ? Call a function inside a select statement to retrive a single value for each row SELECT field1, field2, F_GET_LIBELLE_STATUT( field2 ) FROM table1 WHERE …..
Tag: oracle
How can I select from list of values in Oracle
I am referring to this stackoverflow answer: How can I select from list of values in SQL Server How could something similar be done in Oracle? I’ve seen the other answers on this page that use UNION …
How to retrieve the current value of an oracle sequence without increment it?
Is there an SQL instruction to retrieve the value of a sequence that does not increment it. Thanks. EDIT AND CONCLUSION As stated by Justin Cave It’s not useful to try to “save” sequence number so is good enough to check a sequence value. I still keep Ollie answer as the good one because it answered the initial question. but
0 rows inserted – How can I fix this?
I an trying to INSERT multiple rows into an SQL, Oracle table though SQL Developer v3.0.04 the Database was set-up by Uni so I don’t know what version it is. after looking on-line I have come up with the code below but it will not INSERT any data. I have tested the insert with just one row and that is
How do I create Oracle Type which refers to table columns for data type?
I am trying to define a type using the following code. If I run this, I get the error. What is wrong with this? Answer What’s wrong with it is that %type is PL/SQL syntax. It isn’t supported in SQL. Now we use PL/SQL to define Types (especially member functions, constructors, etc) but the Types themselves are SQL objects, and
java.sql.SQLException: ORA-01843: not a valid month
I am getting the following error when inserting data into my oracle database. In database date is as: dd-MMM-yy (06-MAR-12) I am converting 06-03-2012 to dd-MMM-yy by the following method: So i got 06-Mar-12 which is same as the above database date format still i am getting the error. I am inserting as: in index.jsp in servlet(doPost) Any idea please
Deleting duplicates rows from oracle
I am using oracle database.I want to use duplicate rows from a table except one,which means that I want to delete all rows but atleast one row should be there. I have a table Now i want to delete duplicate rows but at least one row should be there. i had used this to find number of employees that are
How to update with inner join in Oracle
Could someone please verify whether inner join is valid with UPDATE statment in PL SQL? e.g. Update table t set t.value=’value’ from tableb b inner join on t.id=b.id inner join tablec c on c.id=b.id …
Index for nullable column
I have an index on a nullable column and I want to select all it’s values like this: In the explain plan I see a FULL TABLE SCAN (even a hint didn’t help) Does use the index… I googled and found out there are no null entries in indexes, thus the first query can’t use the index. My question is
How to activate the hr schema in Oracle 11g
I am learning PL/SQL and am using SQL Developer cause I created many users with hr schema. But when a user logs in to SQL Developer give an error like the users is invalid. but When I use the system user, it works perfectly but without hr schema. So: How can I activate the hr schema in system user or