logs archiveIRC Archive / Freenode / #oracle / 2015 / August / 12 / 1
dddh
http://www.businessinsider.com/oracle-cso-goes-against-bug-bounties-and-security-researchers-2015-8
;)
atriv
hi, i'm having a heck of a time understanding why this insert won't work. I'm trying to import data to an oracle db from postgres. the problem column was "timestamp with tz" in postgres. I'm looking to import to a oracle "timestamp" column
snippet: INSERT INTO CORE_SUBJECT (ID, CREATED) VALUES (110.0,to_timestamp('2011-10-25 08:57:57.743967-04', 'YYYY-MM-DD HH:MI:SS.FF TZH'));
Xgc
atriv: What makes you think it didn't work. An sqlfiddle.com testcase might help.
atriv
SQL Error: ORA-01821: date format not recognized
undah
yo, i answered in #oracledb too
but i think you need FF5-TZH at the end instead of FF TZH
had to register my nick to be able to speak in here, i'm a newb to freenode
atriv
undah: thanks, i think its still having problems. trying to setup sqlfiddle now
http://sqlfiddle.com/#!4/5193f8/3
Xgc
atriv: Use to_timezone_tz
atriv: sqlfiddle.com only accepts inserts in the left window.
undah
to_timestamp_tz you mean
that seems to be it
Xgc
Correct.
         

atriv
that's it
thanks to both of you
much appreciated
Xgc
atriv: You probably have one more problem.
atriv: The conversion seems to drop the negative indicator when you have a space in the format string. That space only works if you have a separator in the data, which you don't.
atriv: For your specific example, you would need something like this trailing format: SS.FF6TZH
atriv: Otherwise, you would notice +4 generated and not -4
« prev next »