Toad World® Forums

Copied file suffix not working properly in TDA 3.0 automation

I just upgraded to TDA 3.0 from 2.7 and having some trouble migrating automations.

I have a copy file step that does create a new file but the suffix does not render properly. I am using #yyyy-MM-dd_HH-mm#, which worked in 2.7, but results in the number 0 in 3.0.

I tested the built-in Date and Time suffix, but it forces seconds and I don’t want them shown. If I manually strip out the -ss for seconds, Toad throws up an error.

Note that this automation worked fine in 2.7.

Anyway idea what could be going on?

EDIT: also, I would like to change the year/month order in the format string. The built-in string forces the year to show first.

Message was edited by: Texrat

You’re right. There is definitely a problem. I created high priority CR91746 to track this issue.

Thanks for reporting,

Igor.

select to_char(sysdate, ‘MON DD YYYY HH24 MI’) from dual

I did find an issue with using any normal format separator characters such as /-. The Copy file function just doesn’t like any of those. But I think you can find something that will work for you.

Debbie

As a work around I would use a Select statement to format a variable the way I want it. Then append the variable to the file name.

I have attached sample script. I use an Oracle connection and this SQL. You would need to adapt to your database type and how you want the format.
DateTimeSuffix.png

select to_char(sysdate, ‘MON DD YYYY HH24 MI’) from dual

I did find an issue with using any normal format separator characters such as /-. The Copy file function just doesn’t like any of those. But I think you can find something that will work for you.

Debbie

As a work around I would use a Select statement to format a variable the way I want it. Then append the variable to the file name.

I have attached sample script. I use an Oracle connection and this SQL. You would need to adapt to your database type and how you want the format.
Script_1.tas (6.33 KB)