10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
echo "set echo off"; echo "set feedback off"; echo "set linesize 4000"; echo " set pagesize 0"; echo " set sqlprompt ''"; echo " set trimspool on";
Select statement is mentioned below
echo "select res.ti_book_no from disney_ticket_history res where res.ti_status =${STATUS} and... (7 Replies)
Discussion started by: aroragaurav.84
7 Replies
2. Shell Programming and Scripting
HI,
I want to connect to database and fetch the count from a table.
The sql query is as below :
select count(*) from table_test where test_column='read';
How can I print the output of this statement using shell script.
Thanks in advance. (4 Replies)
Discussion started by: confused_info
4 Replies
3. Shell Programming and Scripting
Hi,
I have a perl snippet that call a select query with a bind variable,when i compile the script I'm unable to get the query output.
The same query when i fire in sqlplus fetches few rows.
The query takes bit time to fetch results in sqlplus.
my $getaccts = $lda->prepare("select distinct ... (1 Reply)
Discussion started by: rkrish
1 Replies
4. Shell Programming and Scripting
I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this?
Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies
5. UNIX for Advanced & Expert Users
hi..
i need to optimize my select query ..
my situation is like this ..
i have 15 lac recors in my table..
the following query takes nine seconds to give the required output..
SELECT max(ah.AUC_AMT),
SUBSTRING_INDEX(GROUP_CONCAT(SUBSTRING_INDEX(ah.AUC_CUS_NAME,'@',1) order by AUC_AMT... (1 Reply)
Discussion started by: senkerth
1 Replies
6. Shell Programming and Scripting
hi..
i need to optimize my select query ..
my situation is like this ..
i have 15 lac recors in my table..
the following query takes nine seconds to give the required output..
SELECT max(ah.AUC_AMT),
SUBSTRING_INDEX(GROUP_CONCAT(SUBSTRING_INDEX(ah.AUC_CUS_NAME,'@',1) order by AUC_AMT... (0 Replies)
Discussion started by: senkerth
0 Replies
7. Shell Programming and Scripting
How to redirect postgresql select query to a variable using shell scripts?
I tried to use
psql -c "select ip from servers" db | egrep '+\.+\+\+' | sed 's/^ *\(.*\) *$/\1/'
Output:
10.10.10.180
10.10.10.181
It display ip addresses from the databasem, but how could i redirect the... (3 Replies)
Discussion started by: uativan
3 Replies
8. Shell Programming and Scripting
Dear All,
This may sound a simple query but a non technical person like me is not able to do it, So please help me out.
I m using Unix... isql
I jst wanted to do something like following
select * from xyz
where ID= xxxxxxxx (8 digit ID)
Here if i put single 8 digit ID then the... (5 Replies)
Discussion started by: topgear1000cc
5 Replies
9. Shell Programming and Scripting
Hi,
I have a shell script that returns 10 records for the column Name and age from a select query. Where when i store those data in retrieve_list.txt file i need to store the data in a particular format like:-
$Jason$30
$Bill$23
$Roshan$25
Here is my script:
1)... (15 Replies)
Discussion started by: sachin.tendulka
15 Replies
10. Shell Programming and Scripting
Hi friends :)
I am having a small problem and ur help is needed...
I have a long file from which i want to select only some portions after filtering (grep).
My file looks like :
header
xxyy
lmno
xxyy
wxyz
footer
header
abcd
xy
pqrs
footer
.
. (14 Replies)
Discussion started by: vanand420
14 Replies