This won't work out of the box because only the first part (i.e.
'/tmp/customers') will be interpreted as the file name the rest will be
interpreted as part of your SQL. That's why the error occurs.
In case you are interested in implementing the feature please look at
class SQLToFileHandler. I'd suggest to include some of the formatting
described here:
https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
In case you are not interested in implementing you may file a feature
request here:
https://sourceforge.net/p/squirrel-sql/feature-requests/
Gerd
Am 23.03.20 um 14:20 schrieb GWIN, IVORY:
> Hi all
>
> I working on adding an date extension to a CSV file. Below is sql
> statement I’m using
>
> I receive and error message below.
>
> example
>
> @file '/tmp/customers'||Now()||’.csv’ SELECT * FROM customers
>
> will write the result of 'SELECT * FROM customers' to
>
> '/tmp/customers'||Now()-1||’.csv’
>
> Beginning to write file: \tmp\customers
>
> Error writing file '\tmp\customers’:
> org.teiid.jdbc.TeiidSQLException: Remote
> org.teiid.api.exception.query.QueryParserException: TEIID31100
> Parsing error: Encountered "[*]||[*]Now(" at line 1, column 1.
>
> Was expecting: "alter" | "begin" | "call" | "create" | "delete" |
> "drop" | "exec" | "execute" | "insert" | "merge" ...
>
> Thanks
>
> *Ivory Gwin *
>
> *Senior-System Engineer*
>
> AEIS IT - OMS/SDP/IOMIP
>
> *Phone: 773-628-8643*
>
> *Cell: 847-217-0864*
>
>
>
> _______________________________________________ Squirrel-sql-users
> mailing list Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>
|