Sponsored Content
Full Discussion: Script/SQL configuration
Top Forums Shell Programming and Scripting Script/SQL configuration Post 302589127 by vkca on Wednesday 11th of January 2012 12:29:44 AM
Old 01-11-2012
Java Script/SQL configuration

i have a field in a record which is varchar2(180) and i have stored 180 characters in it
when i query record for the value from sqldeveloper, it is coming properly
when i connect from UNIX and try to query the field, i am getting in 3 lines instead of displaying in 1 line
SHELL SCRIPT :
Code:
sqlplus -silent $USER/$passwd@$DB << EOF
                set heading off
                set feedback off
                set serveroutput on;
        whenever sqlerror exit -1
        whenever oserror exit -2
        SPOOL tmpfile;
 select descr60 from tmp where id='1234'
        SPOOL OFF;
EOF


From UNIX
$ echo tmpfile
Code:
12345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789

FROM SQL DEVELOPER
Code:
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789


i want the value to be displayed in the same line when i query from UNIX
any suggestions on how to solve this?

Last edited by Franklin52; 01-11-2012 at 03:22 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies

2. UNIX for Advanced & Expert Users

Script to get system configuration

Hi, We have >1000 UNIX boxes in our environment with various UNIX flavors like Solaris, HP-UX and Redhat Linux ES 3/4/5. We need to collect their system configuration like - No. of CPUs and their frequencies - RAM Size - No. of HDDs installed and their usage - Exact OS Version and its... (3 Replies)
Discussion started by: prvnrk
3 Replies

3. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, 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 given... (6 Replies)
Discussion started by: praka
6 Replies

4. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

5. Shell Programming and Scripting

Help with hp configuration script (ksh)

Hi I am writting a configuration script to make changes to the /etc/rc.config.d/nddconf file. I have pulled this section out to test it so I have the editing of the file already written. I have two problems with the function. 1. The script is ignoring the results of the if loop. 2. The sed... (12 Replies)
Discussion started by: korg
12 Replies

6. Shell Programming and Scripting

How to grep sql error in shell script and exit the script?

I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts. Here is my script #!/bin/csh -f source .orapass set user = $USER set pass = $PASS cd /opt/data/scripts echo... (2 Replies)
Discussion started by: allinshell99
2 Replies

7. Shell Programming and Scripting

configuration for ftp script in main script

Hi, I am new to shell scripting,and i was planning to write a script that will FTP files to destination folder. I was planning that All configuration should be done through a properties files. and finally the output should be Files are transferred I have developed a properties file named... (4 Replies)
Discussion started by: rahul125
4 Replies

8. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

9. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

10. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies
PASSWD.NNTP(5)						    InterNetNews Documentation						    PASSWD.NNTP(5)

NAME
passwd.nntp - Passwords for connecting to remote NNTP servers DESCRIPTION
The file pathetc/passwd.nntp contains host / name / password triplets for use when authenticating client programs to NNTP servers. This file is normally interpreted by NNTPsendpassword() in libinn(3). Blank lines and lines beginning with a number sign ("#") are ignored. All other lines should consist of three or four fields separated by colons: host:name:password host:name:password:style The first field is the name of a host, and is matched in a case-insensitive manner. (No detailed matching, such as comparing IP addresses, is done.) The second field is a user name, and the third is a password. If either the username or password is empty, then that portion of the authentication will not occur. (For example, a server may require only a username, in which case the password is not necessary. Note that a username is mandatory with AUTHINFO USER/PASS.) The optional fourth field specifies the type of authentication to use. At present, the only recognized "authentication style" is "authinfo"; this is also the default. It means that AUTHINFO USER/PASS commands are used to authenticate to the remote host. (These NNTP commands are described in RFC 4643.) For example: ## UUNET needs a password, MIT doesn't. mit.edu:bbn::authinfo uunet.uu.net:bbn:yoyoma:authinfo This file should not be world-readable. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. $Id: passwd.nntp.pod 8822 2009-11-20 17:34:15Z iulius $ SEE ALSO
inn.conf(5), innd(8), libinn(3). INN 2.5.2 2010-02-08 PASSWD.NNTP(5)
All times are GMT -4. The time now is 02:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy