Page 1 of 1

Incorrect result of sql export

PostPosted: Thu Feb 23, 2012 8:45 am
by vitali.v.c
Date fields are saved incorrectly in exported sql: date/timestamp is represented as is using default date format.
Should be something like TO_DATE('2012-02-23', 'YYYY-MM-DD') or TO_TIMESTAMP('2012-02-23 11:14:32', 'YYYY-MM-DD HH24:MI:SS')

Re: Incorrect result of sql export

PostPosted: Fri Feb 24, 2012 2:53 pm
by Support
SQL export format depends on target database.
Current version uses universal format (actually the same as for CSV export). In fact it will work correctly only for strings, numbers and date/time values (if your export format is the same as default database date/time format).
We'll try to add extended datatypes handlers for non-generic drivers (MySQL, Oracle) in one of next versions.

Thanks for report!

Re: Incorrect result of sql export

PostPosted: Sat Feb 25, 2012 8:25 am
by Serge
I think we will fix (at least partially) this issue in the next version (will be released on the next week).
By default standard SQL92 TO_DATE function will be used. MySQL plugin will use STR_TO_DATE function.

Note that TO_DATE function may be not supported by many databases. For now I have tested it for Oracle and PostgreSQL and it works fine.
Anyway - exporing datetime values in plain form (for SQL export format) doesn't make sense at all so TO_DATE approach is much better.