I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I tried in command line also. I am getting the same thing again.
I executed the same sql query from command line. It's giving the output. but the flat file contains does not have any data.
The output flat file contains data as below
Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ] where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
<logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG
<start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
"-H" displays the SQLPlus version banner and usage syntax
"-V" displays the SQLPlus version banner
"-L" attempts log on just once
"-M <o>" uses HTML markup options <o>
"-R <n>" uses restricted mode <n>
"-S" uses silent mode
Thanks for your timely help but i need some more inputs.
I used the same syntax whatever u sent and now the file is created and records are available in file but the file contains header and trailer details also like below.
SQL*Plus: Release 9.2.0.7.0 - Production on Fri Apr 10 05:29:17 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter user-name:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.7.0 - Production
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5 6 7 8 9
I want to avoid these header & trailer information.