Is there some way to get a value from the last inserted row?
I am inserting a row where the PK will automatically increase due to sequence created, and I would like to get this sequence number. Only the PK is guaranteed to be unique in the table.
I am using Java with a JDBC and Oracle.
I forgot to add that I would like to retrieve thi...
Please tell me whats wrong with the query. I am using Pro C.
EXEC SQL SELECT 1
INTO :db_count
FROM sachin t
WHERE t.serialno = :serial_no
AND t.amount = (:db_inamount - (SELECT NVL(overrun_amount,0)
FROM sunny tovrun
...
if we use the ALTER TABLE RENAME PARTITION statement to rename the existing partitions in an Oracle table, do we need to recreate the local partitioned indexes with newly changed partition names?
...
Lets assume I have this long insert statement
insert into table1 (id, name, phone, very_long_col_name, ...)
values (1, 'very long name indeed...', '555-555-5555', 1, ...)
As you can see above, it gets hard to tell values from their column since their length is uneven
I'm looking for something (e.g. command line util) to ...
Hi - I'm struggling to get sqlldr to import a csv data file into my table, specifically with the field that is a timestamp.
The data in my csv file is in this format:
16-NOV-09 01.57.48.001000 PM
I've tried all manner of combinations in my control file and am going around in circles. I can't find anything online - not even the Oracle...
Hello.
I need to migrate some tables in mysql db to oracle db.
Do you now any tutorial to learn about this migration?
Thanks
...
We are using Java and Oracle for development.
I have table in a oracle database which has a CLOB column in it. Some XYZ application dumps a text file in this column. The text file has multiple rows.
Is it possible that while reading the same CLOB file thru Java application, the escape sequences (new line chars, etc) may get lost??
Re...
I have 64 bit Weblogic 11g installed on 64 bit Linux and trying to connect to a DB by creating a JDBC data source for Oracle 10g on 32 bit. I have connected another Weblogic 32 bit successfully to this DB instance.
However, for the 64 bit Weblogic I am getting exception
Connection test failed.
ORA-01017: invalid username/password; logo...
Which option is better and faster?
Insertion of data after creating index on empty table or creating unique index after inserting data. I have around 10M rows to insert. Which option would be better so that I could have least downtime.
...
I want to check if a variable is null. If it is null, then I want to set a value to that variable:
//data type of var is number
if Var = null then
var :=5;
endif
But I am geting error in it. How can I check if a variable is null?
I am using oracle data type
...
Can we use a select query in embedded sql (pro C) as the first argument in Decode() function.
...
Hi, folks. I would really appreciate to have your help on the following question:
In the last days I've been reading about Oracle's WebLogic, as I'm currently working on a project that uses it. As I've never had contact with WebLogic, I've been doing some research about the infrastructure and learning the pros/cons of using WebLogic Int...
I need to generate unique and consecutive numbers (for use on an invoice), in a fast and reliable way. currently use a Oracle sequence, but in some cases generated numbers are not consecutive because of exceptions that may occur.
I thought a couple of solutions to manage this problem, but neither of they convincing me. What solution do ...
I have an ASP.NET application that uses Oracle for persistence and queries it via ADO.NET and stored procedures.
I have the full version of TOAD and administrative rights to the database.
Is there any way to view all queries issued by the application over the last 10 minutes?
...
Hi
will date datatype hold datetime? its not taking datetime.
i have to store datetime into a field in table, for that which datatype i have to use?
Thanks,
Srikanth
...
I have enterprise project, but all queries are implemented using oracle stored procedures, I use jbdc and Spring framework to get results like this :
public class HoaDonDAOimpl extends JdbcDaoSupport implements HoaDonDAO {
public List<HoaDon> getDsTatcaHoadonPhathanh(int vthang, int vnam,
String vmaDvqltb) throws Exception {
Ca...
I am facing ORA-01000: maximum open cursors exceeded although I am closing the resultsets in finally block. But I suspect there is some trouble with my legacy code, below is my pseudo-code
while (someCondition) {
rs1=executePreparedStatementNew(query1,param1,"");
//do something with rs1
rs1=executePreparedStatementNew(query2,param2,"")...
I have a partitioned table that belongs to tablespace report. I want to move it to tablespace record instead.
One possibility is to drop the table and recreate it in the new tablespace, but that is not an option for me, since there is data in the table that needs to survive the move.
I started by checking that the partitions actually b...
I can't figure out Oracle's encryptic syntax for the life of me. This is Oracle 10g
My session's NLS_LANGUAGE is currently defaulting to AMERICAN.
I need to be able to display UTF8 characters.
Below are some of my attempts, all incorrect:
ALTER SESSION SET NLS_LANGUAGE='UTF8'
ALTER SESSION SET NLS_LANGUAGE='AMERICAN_AMERICA.UTF8'
W...
Dears,
I need to format SQL statement for Oracle Db. I have a sql statement and I don't want to change the case. For Eg.
CREATE TABLE DPAuditTrailDetail
(
ID NUMBER (19, 0) DEFAULT 0 NOT NULL,
AuditTrail NUMBER (19, 0) DEFAULT 0 NOT NULL,
sysObjectField NUMBER (19, 0) DEFAULT 0 NOT NULL,
OldValue ...