Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Did the query return any rows

Re: Did the query return any rows

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Mon, 23 May 2005 00:52:07 GMT
Message-ID: <Xns965EB5C52F8E1SunnySD@68.6.19.6>


"Randy Harris" <randy_at_SpamFree.com> wrote in news:PK9ke.107$l51.44_at_newssvr31.news.prodigy.com:

>
> "IANAL_VISTA" <IANAL_Vista_at_hotmail.com> wrote in message
> news:Xns965EB230B9ADFSunnySD_at_68.6.19.6...

>> "Randy Harris" <randy_at_SpamFree.com> wrote in
>> news:1q8ke.90$3V.58_at_newssvr31.news.prodigy.com:
>>
>> > I'm calling SQL*Plus to run a query from inside a Unix (ksh)
>> > script. 

> How
>> > can I tell whether the query returned any rows or not?
>> >
>> >
>>
>> By making "proper" use of SQL*Plus & the ability to generate a SPOOL
>> file, I test for non-zero length of the output file. In other words
>> zero rows results in a spool file of length 0. I use this approach
>> daily in cron 

> jobs
>>

>
> I'm running the jobs from cron and generating spool files. It didn't
> occur to me that the file would be 0 length. I assumed that it would
> contain the message "no rows selected". Thanks.
>
>

Not if
SET FEEDBACK NO Received on Sun May 22 2005 - 19:52:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US