Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Export CSV in a planified task with a Batch working with SQLCL

Quentin03Nov 3 2017 — edited Nov 6 2017

Hello,

SQLCL is exactly what I need, but I've a big difficulty on one little thing :

I want to make a script (batch file) with Auto connection and just after an EXPORT CSV (on a remote desktop : not on the server).

So I'm using the pipe method with SQLCL in a Batch File:

    echo SET SQLFORMAT CSV <
    echo SPOOL export.csv <
    echo SELECT COUNT(*) FROM ARTICLE; <
    echo SPOOL OFF | C:\Work\Soft\sqlcl\bin\sql.exe login/passwd@xxx.xxx.xxx.xxx:1521/DB.SCH

It's working (no errors in console) but, impossible to find the file `export.csv` : when I change the destination `c:\...` it's working too but impossible to find the created file. It's working fine with SQL Developer and the file is created on my dekstop, so I don't understand why it's not the same case for SQLCL.

This post has been answered by Gaz in Oz on Nov 4 2017
Jump to Answer

Comments

Post Details

Added on Nov 3 2017
4 comments
4,377 views