Client Tools :: How To Get Rid Of First EMPTY Line Of Spooled File
May 30, 2011
how to get rid of the first EMPTY line generated by SQL*Plus when spool'ing to a file.
I tried using set pagesize 0 and while that get rid of the empty blank line, it also disabled the heading ...
Currently using sed as a work around. But unfortunately, can't use sed on Windows?
set pagesize 200
set heading on
set trimspool on
set lines 200
set verify off
set echo off
set feedback off
[code].......
As mentioned, using pagesize 0 remove the blank line but I also lost the heading.
View 4 Replies
ADVERTISEMENT
Jul 29, 2010
I spool an output using the following script and get a final carriage return at the end. This fails our SSIS bulk insert task. Sample below:
SET SPACE 0
SET HEAD OFF
SET FEEDBACK OFF
SET TERMOUT OFF
set echo off
set newpage 0
set space 0
set pagesize 0
[code]....
View 13 Replies
View Related
Jan 22, 2011
I usually work in oracle using the different editors like toad, plsql developer etc. I felt command line is good utility because of various supporting points. I am not sure what kind of command line tools is available/used. I am using pretty straight command line
(run->cmd, then enter username and password).
The best command line tools available. What is generally used command line tools.
View 1 Replies
View Related
Nov 9, 2010
I have installed same days ago the 10.6 toad's Release.I want to put my sql code (packages, views, etc) under team conding in tfs2010.
I have set the tfs2010 voice in Toad: View - Toad Option - Source Control menu'.Then , in team coding toolbar, I clicked "Log On to VCS Provider" and set the right options.
In "View Coding Status" I have all the options set ok (with the green V).I go to the "Open/Launch Version Control Browser", go to my packages and if I try to "Get Latest Version" or double click on my procedures, I get the following error:
"Unable to get revision from VCS repository. Error downloading XXXX" (where XXX is the packages' name)
"Error: VCS archive is empty"
View 1 Replies
View Related
Apr 16, 2010
Using SQL*Plus and having trouble getting each record to output on to one line. The fields I'm querying are:
TEMPLATEID NOT NULL NUMBER(10)
EXPERIMENTID NOT NULL NUMBER(10)
NAME VARCHAR2(200)
CREATEDATE DATE
Obviously, it's the NAME field causing me problems? Have tried using FORMAT, but no change in look of output.
COLUMN TEMPLATEID FORMAT 999999
COLUMN NAME FORMAT A40 WORD_WRAPPED
COLUMN EXPERIMENTID FORMAT 999999
View 7 Replies
View Related
Aug 27, 2011
I want to put some line in my .sql file. The below is my issue :-
SQL>spool /tmp/Tablespace_Remove.ksh
SQL>echo >#!/bin/ksh---- I want to enter this line to my Tablespace_Remove.ksh
SQL>spool off;
View 3 Replies
View Related
Aug 28, 2013
I have a question regarding SQL Developer. When opening a SQL Developer worksheet, there are two different panes or work areas; the upper pane contains the query code and the bottom pane contains the query results (output). Using the
Tools===Preferences tab, I was able to enable line numbering for the top pane (code) but I haven't figured out how to enable line numbering for the bottom pane (results area). how to enable line numbering for the bottom pane?
View 3 Replies
View Related
Jan 27, 2010
i have a issue that when i spool the sql command i get a doted lines below the heading. how to eliminate the doted line but need the heading.
Previous:
OCCUPACODE OCCUPADESC
-------------------- -----------------------------------
1 BUSINESS
2 SERVICE
Needed :
OCCUPACODE OCCUPADESC
1 BUSINESS
2 SERVICE
View 1 Replies
View Related
Sep 11, 2013
I am trying to run PL/SQL Developer from command line, So it can open with an opened SQL WINDOW by default, with a script (which I specify in the command ) already in it:
I've tried:
"C:Program Files (x86)PLSQL Developerplsqldev.exe" userid=andrey/andrey@mydb
but it just opens the application with a connection, no file.
*CORRECTION* While I was writing this post, I tried something , which is not so sophisticated, and it appeared to work...
C:Program Files (x86)PLSQL Developerplsqldev.exe" userid=andrey/andrey@mydb "C:Program Files (x86)PLSQL Developerandrey.sql"
View 1 Replies
View Related
Jul 21, 2010
I'm trying to change a password. I can connect to the db then at the SQL prompt I'm using:
alter user <name> identified by <new password>
The dos window comes back with '2' - then just sits there
View 4 Replies
View Related
Oct 20, 2010
I need to run Toad codexpert using command line I am trying the following command
"C:Program Files... oad.exe" CX="C:... CmdLineTest.ini"
When I execte the command from command line .Codeexprt run and stop after some time and it make entry in the error log as "ora-00942 table or view does not exist".
View 1 Replies
View Related
Jul 9, 2013
Is that possible to modify the ***** and ----- in the TEXT report?
DEPARTMENT_ID JOB_ID LAST_NAME SALARY
============= ========== ========================= ==========
20 MK_MAN Hartstein 13000
************* ********** ----------
sum 13000
From above lines, you can see ****** and ----- which are above sum&13000.
Is that possible to change them as '='?
DEPARTMENT_ID JOB_ID LAST_NAME SALARY
============= ========== ========================= ==========
20 MK_MAN Hartstein 13000
============= ========== ==========
sum 13000
"set underline =" is only shot the headers.
View 3 Replies
View Related
Sep 6, 2010
The way to create a short cut on desktop to have an sql*plus (command line).
i.e. I want to have an short cut on desktop when I click that short cut that would connect me to a specific database with a username and password (which i supply while creating the shortcut-I would provide the database name, username and password)
View 7 Replies
View Related
Mar 22, 2010
i have a little curiosity in result of a select statement.
One database has following characterset settings:
NLS_CHARACTERSET WE8ISO8859P15
NLS_NCHAR_CHARACTERSET AL16UTF16
and the following select statement results in multiple lines:
SQL> select INSTANCE_NAME,STATUS from v$instance;
INSTANCE_NAME
------------------------------------------------
STATUS
------------------------------------
BUP
OPEN
Another database has following characterset settings:
NLS_CHARACTERSET UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
and the same select shows only a 2 line result:
SQL> select INSTANCE_NAME,STATUS from v$instance;
INSTANCE_NAME STATUS
---------------- ------------------------------------
HPSMP OPEN
Both databases are version 10.2.0.4 and both are running on HPUX 11.31.Why do we get this differents in showing the result?
Our problem is that the package-start scripts from HP, to start a database, check the result of the select statement above and if we have the multiline result the check gives an error and stops the package again.
View 3 Replies
View Related
Jun 22, 2010
I need to send email notifications with attachments. Below is my testing codes.
declare
text varchar2(32000);
crlf VARCHAR2(2) := chr(13)||chr(10);
begin
text := 'Test only'||crlf||'test 2'||crlf||'test 3';
UTL_MAIL.SEND_ATTACH_VARCHAR2(
[code]......
I notice that, there is an empty line at the top of the content of this file. I don't want the empty line to be included in my file.
View 4 Replies
View Related
Sep 16, 2011
I am getting an empty line after every 988 records in the output. There are no pagebreaks defined in the layout.
This is a "|" delimited report.
View 2 Replies
View Related
Jul 23, 2012
Is there any setups required for creating a utl file using sql developer. If yes, what are the setups to be done.
View 1 Replies
View Related
Oct 10, 2011
I am connected to an oracle database on campus thru my laptop. The interface i am using is oracle sql developer. We are practicing entering SQL commands. The connection name is DBA120. So, the name of the database is DBA120, correct? Also, I must review the respective ERD (i.e., to know the table relationships) in order to determine the proper sql commands, correct?
Well, in this database connection (DBA120), there are several tables that actually pertain to three different databases, ACCOUNTING, BOOK, and DJ. (I have the respective ERDs.)
I want to be able to save a database to file so I can run it on another computer. How do I save each of the three databases to a file or can't I? Or must I save the DBA120 database? how do i do that? do i save it(them) as sql files?
View 2 Replies
View Related
Jul 26, 2011
To add application name in a spool file, I am using the below way.
sqlplus username/pwd@tns @xyz.sql APP0115
SQL> define appname="'&1'"
Enter value for 1: APP0115
SQL> prompt &appname
'APP0115'
SQL> spool &appname._html_jobs.csv;
SP2-0768: Illegal SPOOL command
Usage: SPOOL { <file> | OFF | OUT }
where <file> is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]
But I am getting the above error in the spool file clause because of single quote printing infront of the spool file. But the method of defining a character is "'&1'". So I cannot avoid this single quote in the define clause.
'APP0115'
print the appname like APP0115 instead 'APP0115'.then only I can use this in the spool file clause?
View 3 Replies
View Related
Nov 27, 2012
Is it possible to execute multiple sql files in one .bat file?for single sql file it is working properly.
.bat file
-------------------------------
sqlplus /nolog @ c: est01.sql
View 5 Replies
View Related
Feb 2, 2010
i m unable to run the following script in sqlplus
SQL> @D:vasucount.sql
SP2-0310: unable to open file "D:vasucount.sql"
SQL>
View 5 Replies
View Related
Feb 19, 2012
I need to say I am an absolute NOOB when it comes to SQL.I need a script to run in TOAD that will reference a CSV file saved onto my local hard drive. I'll try and describe exactly what I need to do.
The current script which I use via TOAD on our companies READ ONLY database is this:
SELECT d.number_id,
d.status_id,
FROM table.number_t d
WHERE d.number_id IN ('1230001', '1230002', '1230003')
This will return a result for each number that exists within the table.number table along with the status of each number i.e. active or inactive. A very basic query.
What I need to be able to do is run that query but instead of having to copy each number into TOAD manually, I need TOAD to check a .csv file of said numbers and then return the results.So I imagine the query would look something like:
SELECT d.number_id,
d.status_id,
FROM table.number_t d
WHERE d.number_id IN (check
View 13 Replies
View Related
Mar 15, 2011
Is it possible to trim the file name while loading into OWB through external tables?
Like suppose I am trying to read a file which has a timestamp value appended in its name. In that case loading into external file would give an error.
View 3 Replies
View Related
Oct 23, 2012
From within a DOS batch file I make the following call:
sqlplus [User]/[password]@[server] @batch_script.sql [Server] [User]
Within the file batch_script.sql I have the following lines:
spool output_batch.lst
connect &&2/[password]@&&1;
@SomeOtherFile.sql
I want to change the last line to something like this:
if &&1 = 'Something' then
@SomeOtherFile1.sql
else
@SomeOtherFile2.sql
end if;
I get the following result
SQL> if &&1 = "something" then
SP2-0734: unknown command beginning "if &&1 = "..." - rest of line ignored.
I took a shot at using the "If" statement and missed.
View 12 Replies
View Related
Aug 20, 2010
how to create a file in a folder based on todays date. i need to know how to define a variable in sqlplus and assign a value to it.Here is the code below. The code gets executed without creating a spool file.
DEFINE _DATE = replace('C:\_sysdate_EU001.csv', '_sysdate_', TO_CHAR(SYSDATE, 'DD-MON-YYYY'))
spool _DATE
set serveroutput on size 100000
select * from dual;
spool off
View 14 Replies
View Related
Jun 5, 2013
I heard .MDD file is Database Designer for MYSQL(i don't knw exactly).how to create it..
View 1 Replies
View Related
May 17, 2012
I want to execute a query which automatically saves the result of a set of queries in a text file and have to send that as an attachment thru a mail (using UTL_MAIL or UTL_SMTP) thru a stored procedure...saving the result in a text file in Toad.
View 2 Replies
View Related
Jan 20, 2011
I use sqplus in oracle to output the command output to text file .
I use below set environment varialble.
SQL> set echo off;
SQL> set linesize 3999;
SQL> set feedback off;
SQL> set feedback off;
SQL> set termout off;
SQL> set pagesize 0;
SQL> spool mapping.txt
select C_SIM_MSISDN,C_SIM_IMSI from RCA_SMART_CARD order by C_SIM_MSISDN;
In ouput file , it look like
SQL> select C_SIM_MSISDN,C_SIM_IMSI from RCA_SMART_CARD order by C_SIM_MSISDN;
060010007 10007
:
:
:
SQL> spool off;
any setting or command that allow me to remove the first sql command line" SQL>select XXXX" and the last command "SQL>spool off" after start up the "spool mapping.txt"
View 8 Replies
View Related
Dec 12, 2012
I'm running this query on sql developer trying to export large file but its not executing.
set head off
spool c:myoracle.txt
select txt_name_insurer||'~'||txt_policy_number from Table_Name where rownum<'10';
spool off
set head on
Error:- line 1: SQLPLUS Command Skipped: set head on
View 16 Replies
View Related
May 28, 2012
We have a table partymast. we want to import the data into this table using excel file having extension .csv. I am explaining all the things below:
select *from partymast
partyid partyname accountname aacname
aa aa 10014000023367 Ashish
select * from master
masterid mname
10014000023367 Ashish
aacname column in partymast table is fetching from master table mname column.
We have third table name IMPEXP
Iename iedesc ietype iedef
import party master import party master imp {ImportStart}
[Transid]=party
[ImportFile]=:
[FileType]=excel
PartyID=col_1
PartyCat=col_2
AccountName=col_3
{ImportEnd}
Sir, I am enclosing the Excel file. what will be the next step that we should filllow.
View 3 Replies
View Related