Computing.Net > Forums > Unix > Help with

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help with

Reply to Message Icon

Name: Jayinohio
Date: August 18, 2004 at 18:10:49 Pacific
OS: HP-Unix 11i
CPU/Ram: Intel 900mhz / 128GB ram
Comment:

I'm hoping someone can help me or give me a hint on something I've been trying to do for over a week now. When I run the following script (in HP Unix 11i) I get the desired results, but I also get "no rows selected" for items in the ARRAY that do not meet the criteria of the search. I have tried everything to keep the "no rows selected" from showing up but have had no sucess so far. I'm figuring there is something I can add to the script to suppress the "no rows selected" message, but for the life of me I can't find it. A big Thanks! to anyone who can help.

for f in ${FFS_ARRAY[*]}
do
sqlplus -s $DB_LOGIN << EOF
select dp_relrec, dp_request_key, dp_group_id, dp_step_flag
from xdproreqfile_$f
where dp_step_flag = 'F';
EOF
done

Here's the Output:

no rows selected

no rows selected

DP_RELREC DP_REQUEST_KEY DP DP_R DP_
---------------
2 0818CAC01 2191S AJ F OV09 BEC

no rows selected

no rows selected

etc...




Sponsored Link
Ads by Google

Response Number 1
Name: Don Arnett
Date: August 18, 2004 at 20:00:35 Pacific
Reply:

Try adding "2>/dev/null" to the end of the sqlplus line, like this:

sqlplus -s $DB_LOGIN << EOF 2>/dev/null


This says to redirect stderr to nowhere


0

Response Number 2
Name: Don Arnett
Date: August 18, 2004 at 20:02:38 Pacific
Reply:

I should have added:

I've never used sqlplus, but on other db tools that I've used, the output like "No rows selected" goes to stderr and the actual data output goes to stdout.

If this isn't the case, if all output is going to the same place (all to stdout or all to stderr), then my answer won't work


0

Response Number 3
Name: Jayinohio
Date: August 18, 2004 at 21:41:09 Pacific
Reply:

Don...Thanks for the suggestion..but unfortunately that made no difference. I'm pretty sure it is probably something simple like that though that will take care of it, but I just can't come up with it. Thanks again.



0

Response Number 4
Name: Jim Boothe
Date: August 19, 2004 at 07:10:38 Pacific
Reply:

Prior to your select statement, add:

set feedback off


0

Response Number 5
Name: Jayinohio
Date: August 19, 2004 at 13:12:28 Pacific
Reply:

Thanks Jim!! That was what I needed. I had tried that before, but I had put it on the line before it logs into sqlplus...forgot that it has to go before the select statement. Thanks again..you've made my day! :-)


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Help with

Help with gcc www.computing.net/answers/unix/help-with-gcc/5280.html

Help with Bourne Shellscript (More) www.computing.net/answers/unix/help-with-bourne-shellscript-more/5005.html

help with analog.cfg file on virtual ser www.computing.net/answers/unix/help-with-analogcfg-file-on-virtual-ser/3152.html