Trafodion support of TO_DATE

2016-03-19 Thread Liu, Ming (Ming)
Hi, all,

I know there will be a new feature to support TO_DATE, currently, without this 
feature, is there any way to migrate a query using TO_DATE?

Example:
insert into myTbl (staff_id, 
orbat_code,operate_time,ip_arr,browser_version,orbat_desc) 
values('ADMIN','V1369930001010',to_date('20160317114706','-MM-dd 
hh24:mi:ss')


thanks,
Ming


RE: Trafodion support of TO_DATE

2016-03-19 Thread Anoop Sharma
 

You will have to convert the TO_DATE part of the query to an explicit
datetime literal that looks like:

   timestamp '2016-03-17 11:47:06'

 

With TO_DATE support (this is on trafodion now but will be externally
available as part of Traf 2.0), you

can use the statement that you have listed.

But.the format part need to match the string datetime value. In your
example, it doesn't.

The correct syntax will be:

  to_date('20160317114706', 'MMDDHH24MISS')

 

or

 

  to_date('2016-03-17 11:47:06', '-MM-DD HH24:MI:SS')

 

anoop

 

From: Liu, Ming (Ming) [mailto:ming@esgyn.cn] 
Sent: Wednesday, March 16, 2016 8:51 PM
To: user@trafodion.incubator.apache.org
Subject: Trafodion support of TO_DATE

 

Hi, all,

 

I know there will be a new feature to support TO_DATE, currently, without
this feature, is there any way to migrate a query using TO_DATE?

 

Example:

insert into myTbl (staff_id,
orbat_code,operate_time,ip_arr,browser_version,orbat_desc)
values('ADMIN','V1369930001010',to_date('20160317114706','-MM-dd
hh24:mi:ss')  

 

 

thanks,

Ming



答复: Trafodion support of TO_DATE

2016-03-19 Thread Liu, Ming (Ming)
Thanks Anoop,

I see how to change it now.
This will be some work to replace all literal in the application, so the coming 
TO_DATE feature of Trafodion 2.0 will be a great help for database migration 
project.

Thanks,
Ming

发件人: Anoop Sharma [mailto:anoop.sha...@esgyn.com]
发送时间: 2016年3月17日 12:05
收件人: user@trafodion.incubator.apache.org
主题: RE: Trafodion support of TO_DATE


You will have to convert the TO_DATE part of the query to an explicit datetime 
literal that looks like:
   timestamp ‘2016-03-17 11:47:06’

With TO_DATE support (this is on trafodion now but will be externally available 
as part of Traf 2.0), you
can use the statement that you have listed.
But…the format part need to match the string datetime value. In your example, 
it doesn’t.
The correct syntax will be:
  to_date(‘20160317114706’, ‘MMDDHH24MISS’)

or

  to_date(‘2016-03-17 11:47:06’, ‘-MM-DD HH24:MI:SS’)

anoop

From: Liu, Ming (Ming) [mailto:ming@esgyn.cn]
Sent: Wednesday, March 16, 2016 8:51 PM
To: 
user@trafodion.incubator.apache.org<mailto:user@trafodion.incubator.apache.org>
Subject: Trafodion support of TO_DATE

Hi, all,

I know there will be a new feature to support TO_DATE, currently, without this 
feature, is there any way to migrate a query using TO_DATE?

Example:
insert into myTbl (staff_id, 
orbat_code,operate_time,ip_arr,browser_version,orbat_desc) 
values('ADMIN','V1369930001010',to_date('20160317114706','-MM-dd 
hh24:mi:ss')


thanks,
Ming