?
Solved

Solve my Time stamp Problem in oracle

Posted on 2011-02-10
6
Medium Priority
?
793 Views
Last Modified: 2013-12-19
Solve my Time stamp Problem in oracle

VALUES('1','1','1','1','1',TO_TIMESTAMP(TO_CHAR('02-02-2011 12:12:16','DD-MM-YYYY HH24:MI:SS')),

in time stamp it would provide invalid number

could you please give me the correct syntax in Timestam
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34868739
try this :

VALUES('1','1','1','1','1',TO_TIMESTAMP('02-02-2011 12:12:16.123456789','DD-MM-YYYY HH24:MI:SS.XFF'))

0
 
LVL 9

Author Comment

by:Manikandan Thiagarajan
ID: 34869932
please correct this one it would throw invalid number in time stamp format

INSERT INTO com_ebpp_bill_reg_hst
(EBR_LV_CODE_ST
,EBR_BILLER_CODE_ST,
EBR_BILL_UPLOAD_TYPE_ST,
EBR_PAY_PRES_FLAG_ST,
EBR_ACTIVE_STATUS_FLAG_ST,
EBR_BUS_DATE_DT,
EBR_MAKER_ID_ST,
EBR_MAKER_DATETIME_DT,
EBR_CHECKER_ID_ST,
EBR_CHECKER_DATETIME_DT,
EBR_CHANNEL_SOURCE_ST,
EBR_RECRD_STATUS_ST,
EBR_MAKER_REMARKS_ST,
EBR_CHECKER_REMARKS_ST,
EBR_WORK_BR_ID_DO)
VALUES('1','1','1','1','1',to_timestamp(TO_CHAR('12-01-2010 22:12:12' ,'DD-MM-RRRR HH24:MI:SS'),'DD-MM-RRRR  HH24:MI:SS')

,
'1',
sysdate,
'1',sysdate,'y','y','y','y',1)
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 34870299
Don't put to_char on a string

TO_CHAR('12-01-2010 22:12:12'

'12-01-2010 22:12:12'  is already a string
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 34870302
to_timestamp('12-01-2010 22:12:12','DD-MM-RRRR  HH24:MI:SS')
0
 
LVL 13

Expert Comment

by:Rahul Agarwal
ID: 34931687
Try this

VALUES('1','1','1','1','1',TO_DATE('02-02-2011 12:12:16','DD-MM-YYYY HH24:MI:SS'),
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34935560
did you try what i suggested ?
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question