WbExport - filename with timestamp

5 views
Skip to first unread message

Darshak

unread,
Dec 14, 2022, 8:06:35 AM12/14/22
to SQL Workbench/J - DBMS independent SQL tool
Hi,

I need to run SQLs daily using WbExport and generate output file's name with timestamp .
e.g. output_14dec2022.txt

Is it possible using WbExport on Windows ?

Thanks
Darshak

Thomas Kellerer

unread,
Dec 14, 2022, 8:24:38 AM12/14/22
to sql-wo...@googlegroups.com
You can create a variable based on a SELECT statement:

(Postgres syntax)

WbVarDef today=@"select to_char(current_date, 'yyyy_mm_dd')";
WbExport -file=export_$[today] ....;


Regards
Thomas

Darshak schrieb am 14.12.2022 um 14:06:
> Hi,
>
> I need to run SQLs daily using WbExport and generate /output file's name /with timestamp .

Darshak

unread,
Dec 14, 2022, 8:40:19 AM12/14/22
to SQL Workbench/J - DBMS independent SQL tool
Thanks a lot, will try given solution.
Reply all
Reply to author
Forward
0 new messages