![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To spool output from a database query | *Jess* | Shell Programming and Scripting | 0 | 04-07-2008 12:23 AM |
| Database Query | jisha | Shell Programming and Scripting | 0 | 01-22-2008 03:13 AM |
| Dynamic update loop query on Sybase database | Alaeddin | Shell Programming and Scripting | 10 | 12-13-2007 06:26 AM |
| query | akash | Shell Programming and Scripting | 2 | 12-07-2007 06:37 AM |
| storing database query in a variable | debu | Shell Programming and Scripting | 3 | 11-25-2007 07:59 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
query to get a value from database
Hi friends,
I have written a script which retrieves one value from the database. It takes time for the sql query to get the desired output. So the query runs fine from TOAD or from UNIX console. However if I put this in a script it doesn't work. The script is as below. #! /bin/ksh DB_VALID_CDR=`sqlplus -s username/password<<!EOF | grep -v "^Connected" 2>&1 set termout off echo off feedback off pause off timing off time off set pages 0 clear breaks clear compute set termout on select a.VALUE_INTEGER from client_statistics a, statistic_type b where a.STATISTICS_TYPE=b.Statistic_type_id and a.STATISTICS_OBJECT like '%20071217102445_9673324_AG40_20071217101738_0000002118%' and b.STATISTIC_TYPE='valid_cdrs' EXIT !EOF` echo $DB_VALID_CDR I strongly believe that the issue is with the query taking time to return the value. Please let me know how to tackle the issue. Many thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|