Hi,
i would like to retrieve seql result and write it into unix text file like "result.txt"
In unix, normally, I type "sql" and get into sql,then type "select....." to run and get the result....then copy and paste into result.txt
any possible way to write a script to run it automatically?... (3 Replies)
Hi,
I search all post...and no soluation about..if i would like to run a sql statement and output the result to txt file.
for example,
i usually run "sql" to logon the database and run select statement. Then I need to copy the output into the result.txt. Can I run the script to do this... (7 Replies)
Hi,
I have about 12 columns and 15 rows to be retrived from sybase isql command through unix. But when i output the sql into a file and see it, the formatting is going for a toss. can someone please suggest how can i get the result correctly in the output file ?
Thanks,
Sateesh (2 Replies)
Hi guys,
Is there a way a script can run an SQL statement and dump the results into a variable which can then be used later in the script?
Thanks. (3 Replies)
Hi All,
I want to format the result driven from the query into neat format.
For example pls find the below code,
#! /bin/sh
result='
sqlplus -s uname/passwrd@DBname
select no,name,address,ph_no, passport_no,salary,designation
from emp_table where salary>1000;
exit
EOF'
... (8 Replies)
I want to send email for every row comes out of following SQL statement
thank you for your help.
*****SQL STATEMENT******
Select SCUSER AS "USER IDS" , SCEUSER AS "LOCKED OUT" FROM SYS.7333.F98OWSEC;
*******OUPUT COMES LIKE THIS AND ONE EMAIL COMES AS PER SCRIPT BELOW******
******BUT... (4 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
im trying to assign the result of the db2 command to a variable inside a shell script...
: tab_cnt=`db2 "select count(*) from syscat.tables where tabname = 'ABC' and tabschema = 'MATT01'" |head -4|tail +4|cut -c 11`
: echo $tab_cnt
when i echo im getting a blank value.. im expecting... (1 Reply)
This is my command
echo "Test" | sed -f <(sed -e 's/.*/s,&,gI/' mydic)
In mydic file,containing 2 columns delimit by comma (,)
a,AlphabetA
.
.
.
e,AlphabetE
.
.
s,AlphabetS
.
t,AlphabetT
test,testedd
.
.
zebra,zebraaaa
The expect result is testedd (0 Replies)
How to Get SQL query result to file in putty?
I have one SQL query and I want that query output to be redirected to the file.
uname -a
SunOS XXX 5.8 Generic_117350-58 sun4u sparc SUNW,Sun-Fire-480R
Please suggest. (7 Replies)
Discussion started by: pamu
7 Replies
LEARN ABOUT DEBIAN
sql::reservedwords
SQL::ReservedWords(3pm) User Contributed Perl Documentation SQL::ReservedWords(3pm)NAME
SQL::ReservedWords - Reserved SQL words by ANSI/ISO
SYNOPSIS
if ( SQL::ReservedWords->is_reserved( $word ) ) {
print "$word is a reserved SQL word!";
}
DESCRIPTION
Determine if words are reserved by ANSI/ISO SQL standard.
METHODS
is_reserved( $word )
Returns a boolean indicating if $word is reserved by either "SQL:1992", "SQL:1999" or "SQL:2003".
is_reserved_by_sql1992( $word )
Returns a boolean indicating if $word is reserved by "SQL:1992".
is_reserved_by_sql1999( $word )
Returns a boolean indicating if $word is reserved by "SQL:1999".
is_reserved_by_sql2003( $word )
Returns a boolean indicating if $word is reserved by "SQL:2003".
reserved_by( $word )
Returns a list with SQL standards that reserves $word.
words
Returns a list with all reserved words.
EXPORTS
Nothing by default. Following subroutines can be exported:
is_reserved
is_reserved_by_sql1992
is_reserved_by_sql1999
is_reserved_by_sql2003
reserved_by
words
SEE ALSO
SQL::ReservedWords::DB2
SQL::ReservedWords::MySQL
SQL::ReservedWords::ODBC
SQL::ReservedWords::Oracle
SQL::ReservedWords::PostgreSQL
SQL::ReservedWords::SQLite
SQL::ReservedWords::SQLServer
ISO/IEC 9075:1992 Database languages -- SQL
ISO/IEC 9075-2:1999 Database languages -- SQL -- Part 2: Foundation (SQL/Foundation)
ISO/IEC 9075-2:2003 Database languages -- SQL -- Part 2: Foundation (SQL/Foundation)
AUTHOR
Christian Hansen "chansen@cpan.org"
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2008-03-28 SQL::ReservedWords(3pm)