Toad World® Forums

Dates in Export Data dialog


#1

create table at_test13 (id number, date1 date, date2 date);

insert into at_test13 values (1, sysdate, sysdate + 5);

select * from at_test13;

INSERT INTO at_test13

VALUES

INSERT INTO at_test13

/

And this will obviously fail.
I’d like to see


VALUES

/

This should run in a database with any settings
The format mask itself is not very important - everything has to be present and no MON used (because month no 12 will become DETS in my environment not DEC)
DD.MM.YYYY HH24:MI:SS
YYYYMMDDHH24MISS
SSHH24MMYYYYMIDD
all are fine

Thanks,
Andres

This is more like an enhancement request, but this feature would help me alot…
would it be possible in Export Data dialog, when Format = Table INSERT not to use any date format at all, but generate “to_date(‘20071214114000’,‘YYYYMMDDHH24MISS’)” so that

  1. date precision is preserved no matter what date format is in nls_session_parameters or SQL Navigator preferences - if the date needs to be adjusted i can adjust it in the select statement, eg select trunc(date) instead of select date from table
  2. the most important - it would not be dependant of the target database date language and nls_parameters.

The format in the to_date is not important - the order of date/time or punctuation
Maybe when not the default but another option in the select list (“use to_date”), although it seems to me it only makes sense when Format = Table INSERT. But when Table INSERT, all other options don’t make sense IMHO, because the DATA has to make it to the new table regardless of formats. And the -MON- option won’t be good, because it might get translated and the target database may not understand - so please -MM- format. And probably something similar for timestamps.

example:
********____it shows according to my preferenced format
1 14.12.2007 12:00:16 19.12.2007 12:00:16
and now export data using table insert
and i get
********(1,‘14.12.2007 12:00:16’,‘19.12.2007 12:00:16’)****(1,to_date(‘14.12.2007 12:00:16’, ‘DD.MM.YYYY HH24:MI:SS’),to_date(‘19.12.2007 12:00:16’, ‘DD.MM.YYYY HH24:MI:SS’))


#2

Hi Andres,

This is exactly how the new Code Editor in v6.0 does it. We completely reworked Export, as well as entire SQL Editor, Stored Program Editor and a few other components, and put their functionality into a new multi-tabbed Code Editor. Please tell us if you are interested in participating in 6.0 Beta.

Regards,
Roman


#3

I’m looking forward to the next beta (which hopefully doesn’t compile package specs when only body is changed and doesn’t replace “&”-s) for a looong time already :slight_smile:

Regards,
Andres