Home » SQL & PL/SQL » SQL & PL/SQL » help with date field
help with date field [message #9870] Wed, 10 December 2003 15:50 Go to next message
Antonio
Messages: 12
Registered: October 2001
Junior Member
Hi, I created a table with a date field. however when I insert dates (09-NOV-1999)
by default it puts all dates as 09-NOV-99, and I need to be inserted as YYYY.

this is a part of sql

create table Kernel_val
(changed date,
kernel_name varchar2(30), ...)

TIA for any help.
Re: help with date field [message #9871 is a reply to message #9870] Wed, 10 December 2003 16:56 Go to previous messageGo to next message
sverch
Messages: 582
Registered: December 2000
Senior Member
See what default date format you have:
SQL> show parameter nls_date_format
or
SQL> SELECT sysdate FROM dual;

If you have 10-DEC-2003 then go to
http://asktom.oracle.com/pls/ask/f?p=4950:8:383290::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:351017764854,

Otherwise - if you have 10-DEC-03 - then you need to change NLS_DATE_FORMAT in init.ora file.
Or you can change this format on the session level:
alter session set NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Re: help with date field [message #9887 is a reply to message #9871] Thu, 11 December 2003 09:04 Go to previous messageGo to next message
Antonio
Messages: 12
Registered: October 2001
Junior Member
Sverch,

thank you for your help, I did follow the steps you mentioned and ALL is fine and working the way I need.

thank you once again,

peace

./antonio/.
Re: help with date field [message #9971 is a reply to message #9887] Thu, 18 December 2003 00:34 Go to previous message
Ajendra Naraya Samal
Messages: 26
Registered: December 2003
Junior Member
Hai
I am accesing abt 2 million records from a remote database by giving the command
Insert into target Select * from source@dblink
It takes around 2 hrs to fetch the data for around 25-26 lakh records . Is there any way to improve performance.
Will the performance increase if I fetch first 20000 record in PL/SQL loop and then give the COMMIT stmt.
Also I can fetch the first 20000 rows using ROWNUM and give the commit stm then after. Will that be a better way ?

Will it be faster if I BULK FETCH AND then insert the data using FORALL stmt.

Is there any other way in oracle which will increase the performance ?
Thanks and regards
Ajendra
ajendrans@planetasia.com
Previous Topic: Trigger
Next Topic: douhts in asktom
Goto Forum:
  


Current Time: Thu Apr 25 13:11:47 CDT 2024