problem in spool command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prasad joshi
    New Member
    • Aug 2012
    • 30

    problem in spool command

    hello

    I am writing code to store output of sql in txt or excel

    I have tried following code

    but it gives me error that

    ORA-00900: invalid SQL statement

    Code:
    spool output.txt
    select * from emp;
    spool off;
    is script runner required for executing this code???

    am I using spool command correctly???

    Please help me.....
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Spool is a SQL Plus command. It can note be used in PL/SQL. Confirm that you're using SQL Plus and that the spool command is outside the PL/SQL block.

    Comment

    • prasad joshi
      New Member
      • Aug 2012
      • 30

      #3
      SQL PLUS means????

      I will have to use sql server2005 for executing spool command???

      I am not getting.

      Please Help.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        SQL Plus is a utility that comes with Oracle.

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          If you do not know what is SQL Plus, please let me know where are you writing all your SQL queries .

          Comment

          • prasad joshi
            New Member
            • Aug 2012
            • 30

            #6
            I am writting in oracle sql editor

            Comment

            Working...