![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| why shell script fails? | tahir23 | Shell Programming and Scripting | 4 | 08-25-2008 09:46 AM |
| why script fails sometime? | tahir23 | UNIX for Advanced & Expert Users | 10 | 08-21-2008 06:04 PM |
| why shell script fails | tahir23 | Shell Programming and Scripting | 4 | 08-21-2008 10:37 AM |
| file <filename> fails | kingskar | UNIX for Advanced & Expert Users | 2 | 08-14-2006 09:07 AM |
| Script fails | JStone | Shell Programming and Scripting | 8 | 08-10-2006 12:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
The only thing you have to do is check the ${connect1} value before printing it:
Code:
if [ -n "${connect1}" ]; then
echo "${connect1}"
else
echo "No rows returned"
fi
Code:
echo "${connect1}"
|
|
|||||
|
Thanks . But what if suppose after select statement i m updating using that value and if update fails how to get that in log file.
Basically how to show in the log file that the given SQL query has really worked successfully or not ....... Last edited by ali560045; 01-06-2009 at 03:42 AM.. |
|
|||||
|
i have now modified the code instead of select i m now doing update . i have use the spool concept here.
But still i m not getting any info like "0 rows Updated" in the spool file. How to get that info in spool file below the code using update Code:
#!/bin/ksh
. $HOME/conf/systemProperties/EnvSetup.properties
sqlplus -silent amit/qwerty@edna.world <<END
set pagesize 0 feedback off verify off heading off
spool Script_Fails.log
UPDATE SIEBEL.S_ASSET_XM SDPX
SET SDPX.ATTRIB_03 = 'Inactive',
SDPX.LAST_UPD_BY = '1-42V',
SDPX.LAST_UPD = SYSDATE,
SDPX.ATTRIB_04 = 'SQQ3'
WHERE SDPX.PAR_ROW_ID IN ('090845086LG')
AND SDPX.ATTRIB_01 = 'AMR Ready'
AND SDPX.ATTRIB_03 = 'Active';
commit;
exit;
END
Thanks in advance Last edited by ali560045; 01-06-2009 at 03:59 AM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|