1 Reply Latest reply on Jun 14, 2012 3:30 PM by Paul M.

    Reroute sql output to file?

      So I have a .sql script:
      select table_name, column_name,count(*) over(partition by table_name) count_column from user_tab_columns

      that I can run in SQLDeveloper and it outputs what I want into a "Script output" window below.
      I want to be able to run this from a command line and have everything that currently goes to that window go into say log.txt

      When I run sqlplus usr/pass@SID <myscript.sql it just logs in and logs out. Not really sure what's happening.

      Sorry mods, I found a solution:
      SPOOL filename

      Edited by: 940349 on Jun 14, 2012 7:07 AM

      Edited by: 940349 on Jun 14, 2012 7:24 AM