i'm used a sql query in a unix script to get the information from table. but unable to extract the output which i need. Any help with logic will be greatly appreciated.
my sql query provide output some thing like this -
col1 col2 count
---- ---- ------
A B 10
c D 6
e... (8 Replies)
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)
Hi,
I am executing sql files in my unix shell script. Now i want to find whether its a success or a failure record and redirect the success or failure to the respective files. meaning.
success records to success.log file
failure record to failure.log file.
As of now i am doing like... (1 Reply)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Hello Guys,
This message is somewhat relates with last thread. But I need to re-write thing. I start over a little. I am stuck now and need your help.
Here is my script-
#! /bin/ksh
export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2
/opt/oracle/app/oracle/product/9.2/bin/sqlplus -s... (5 Replies)
Hi
I want ot save SQL query result in one txt file. for that i have written one code line
sqlplus -s $dbstring @/usr/local/bin/sched/nightly_Cronjob/exec_123.sql >> /usr/local/bin/sched/nightly_Cronjob/result.txt
but it is not working .
database : Oracle
so please advice me how can i... (7 Replies)
Hi all,
I have a flat file as below;
470423495|1||TSA-A000073800||1|||1
471423495|1||TSA-A000073800||5|||5
472423495|1||TSA-A000073800||2|||7
473423495|1||TSA-A000073800||3|||3
I like to create a Unix script.
The script have to valuate the last two columns, if the values are... (4 Replies)
Hi All,
#!/bin/ksh
call_sql ()
{
sql=$1
sqlplus -s $sqlparam_sieb <<EOF
SET ECHO OFF;
SET NEWPAGE NONE;
SET SQLBL OFF;
SET VERIFY OFF;
SET LINESIZE 2000;
SET... (2 Replies)
I am writing the following script to create the file v_out.txt.
sqlplus -s /nolog << EOF
CONNECT scott/tiger@orcl;
whenever sqlerror exit sql.sqlcode;
set newpage 0;
SET PAGESIZE 0;
SET ECHO OFF;
SET FEEDBACK OFF;
SET HEADING OFF;
SET VERIFY OFF;
SET LINESIZE 100;
set tab off;
set... (7 Replies)
I am trying to write SQL query output into a .csv file. But in the output columns are displaying in different lines instead of coming in one line.
Main Code shell script:
this is my code:
#!/bin/bash
file="db_detail.txt"
. $file
rm /batch/corpplan/bin/dan.csv... (6 Replies)
Discussion started by: sandeepgoli53
6 Replies
LEARN ABOUT CENTOS
bdiff
bdiff(1) User Commands bdiff(1)NAME
bdiff - big diff
SYNOPSIS
bdiff filename1 filename2 [n] [-s]
DESCRIPTION
bdiff is used in a manner analogous to diff to find which lines in filename1 and filename2 must be changed to bring the files into agree-
ment. Its purpose is to allow processing of files too large for diff. If filename1 (filename2) is -, the standard input is read.
bdiff ignores lines common to the beginning of both files, splits the remainder of each file into n-line segments, and invokes diff on cor-
responding segments. If both optional arguments are specified, they must appear in the order indicated above.
The output of bdiff is exactly that of diff, with line numbers adjusted to account for the segmenting of the files (that is, to make it
look as if the files had been processed whole). Note: Because of the segmenting of the files, bdiff does not necessarily find a smallest
sufficient set of file differences.
OPTIONS
n The number of line segments. The value of n is 3500 by default. If the optional third argument is given and it is numeric, it is
used as the value for n. This is useful in those cases in which 3500-line segments are too large for diff, causing it to fail.
-s Specifies that no diagnostics are to be printed by bdiff (silent option). Note: However, this does not suppress possible diagnos-
tic messages from diff, which bdiff calls.
USAGE
See largefile(5) for the description of the behavior of bdiff when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
FILES
/tmp/bd?????
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
SEE ALSO diff(1), attributes(5), largefile(5)DIAGNOSTICS
Use help for explanations.
SunOS 5.10 14 Sep 1992 bdiff(1)