01-21-2009
Pls describe the problem you are facing !!!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that looks for all jobs that contain a particular calendar.
Some of the calendars have '&' in them and sql freaks out when it encounters that.. is there a way around this?
I have tried:
select job_name from job where run_calendar='1&15dom'
select job_name from job... (3 Replies)
Discussion started by: Lindarella
3 Replies
2. Shell Programming and Scripting
Hi ...
I am doing a switch user and then rsh and then running a sql query .
I am successfull in rsh and logging into the database , but my query doesnt run ..
Here's the command :
su - linus -c "rsh -l linus psmf ORACLE_SID=SMP;export ORACLE_SID;sqlplus... (1 Reply)
Discussion started by: sars
1 Replies
3. Shell Programming and Scripting
Hi,
When i execute the below statement , the value is not getting stored in the variable.
AnneeExercice=`sqlplus $LOGSQL/$PASSWORDSQL << FIN >> $GEMOLOG/gemo_reprev_reel_data_ventil_$filiale.trc
SELECT bi09exercice
FROM bi09_scenario
WHERE bi09idfiliale=UPPER('de')
AND ... (1 Reply)
Discussion started by: krishna_gnv
1 Replies
4. Shell Programming and Scripting
Unix prompt
=========
echo "Enter the query"
read q
==========
User has entered :
SELECT * FROM employee
=====================
Now the problem starts..
echo $q
Output: SELECT "all files names in the PWD" FROM employee
================================================
... (5 Replies)
Discussion started by: Niroj
5 Replies
5. Shell Programming and Scripting
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)
Discussion started by: Nareshp
2 Replies
6. Shell Programming and Scripting
I used the following code
code
select * from tablename where columnname
Instead of printing the expected output it prints all the files in the present directory since there is a "*" in the code. Is there any way to overcome the problem?
Thanks
Ananth (2 Replies)
Discussion started by: Ananthdoss
2 Replies
7. Shell Programming and Scripting
Hi Guys..
Need your help to format the output of my shell script.
I am using spool command to take out put in csv file.
below is my code. (for example)
col USERNAME for a15
col EMAIL for a30
col FULL_NAME for a20
col LAST_LOGIN for a40
col DATE_CREATED for a40
SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies
8. Shell Programming and Scripting
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
9. Programming
Hi All ,
I have tried many times am getting syntax error on 'UNION'
can anybody tell me ...
INSERT INTO table1
(
Type
, num_items
, num_letters
, total_value
)
(select
type='1',
num_items,
num_letters=count(*),
total_value=sum(letter_value)
from
table2
where
num_items = 1 (1 Reply)
Discussion started by: Venkatesh1
1 Replies
10. Shell Programming and Scripting
Hi,
I have created a shell script that reads line from text file and insert into DB table. I have used IFS to separate the line text. Looks IFS is splitting text properly but while passing one of the values that has special characters in it to query, it is giving weird issue. Below is my... (2 Replies)
Discussion started by: yuvi
2 Replies
MYSQL(1) General Commands Manual MYSQL(1)
NAME
mysql - text-based client for mysqld, a SQL-based relational database daemon
SYNOPSIS
mysql [-B|--batch] [-#|--debug= logfile] [-T|--debug-info] [-e|--exec= command] [-f|--force] [-?|--help] [-h|--host= hostname]
[-n|--unbuffered] [-p[pwd]] [--password=[pwd]] [-P|--port= pnum] [-q|--quick] [-r|--raw] [-s|--silent] [-S|--socket= snum] [-u|--user=
uname] [-v|--verbose] [-V|--version] [-w|--wait]
DESCRIPTION
The mysql program provides a curses-based interface to the SQL-based database server daemon, mysqld(1). Full fuller documentation, refer
to the HTML documents installed with the package.
OPTIONS
-B|--batch
Print results with a tab as separator, each row on a new line.
-#|--debug=logfile
Employ the specified debug log.
-T|--debug-info
Print debug information upon exiting.
-e | --exec=command
Execute the specified command and quit (--batch is implicit).
-f|--force
Continue even if the face of a SQL error.
-?|--help
Display a help message and exit.
-h|--host=hostname
Connect to the specified host.
-n|--unbuffered
Flush the buffer after each query.
-p|--password[=pwd]
Employ the specified password when connecting to the database server. If a password is not supplied, it will be requested interac-
tively.
-P|--port=pnum
Employ the specified port number for connecting to the database server.
-q|--quick
Do not cache the result; print it row by row. This may slow down the server if the output is suspended.
-r|--raw
Write fields without conversion. (used with --batch).
-s|--silent
Silent mode: reduce the amount of output.
-S|--socket=snum
Employ the specified socket file for connecting to the database server.
-u|--user=uname
Employ the specified user name for logging in to the server.
-v|--verbose
Verbose mode: write more Specifying this option twice produces a tabular output format.
-V|--version
Print the mysql version number and exit.
-w|--wait
Wait and retry if the database server connection is down.
FILES
/depot/bin/mysql executable
/depot/bin/mysqld executable
/depot/bin/safe_mysqld
executable shell script for starting mysqld safely
/site/var/mysql/data location of database files
EXAMPLE
You can also read a backup dump file back into MySQL with:
mysql database < backup-file.sql
SEE ALSO
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror
(1), replace (1), safe_mysqld (1), which1 (1), zap (1),
AUTHOR
Ver 6.3, distribution 3.20.20 Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no
warranty. Manual page by R. P. C. Rodgers, Lister Hill National Center for Biomedical Communication, U.S. National Library of Medicine
(rodgers@nlm.nih.gov).
13 June 1997 MYSQL(1)