Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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
doneHere's the Output:
no rows selected
no rows selected
DP_RELREC DP_REQUEST_KEY DP DP_R DP_
---------------
2 0818CAC01 2191S AJ F OV09 BECno rows selected
no rows selected
etc...

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

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

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.

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! :-)

![]() |
![]() |
![]() |

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