Search the web
Sign In
New User? Sign Up
rexxlist · General REXX Discussion List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
RXSQL with COUNT in SELECT statement in MVS REXX   Message List  
Reply | Forward Message #6291 of 16003 |
Re: RXSQL with COUNT in SELECT statement in MVS REXX

I think the trick is to use SELECT COUNT(*) INTO :hostvar, so that you can
control where the result of the count function is placed. I haven't done
this with RXSQL, but SQL is (pretty much) SQL, so it would look something like:

"select count (*) into :mycount",
"from car_table",
"where color='RED' AND model = 'MUSTANG'""

say 'There are' mycount 'RED MUSTANGS found in table CAR_TABLE'

At 03:26 PM 7/7/00 -0400, Daryl Wells wrote:
>I am trying to use COUNT in a SQL SELECT statement using RXSQL (against
>DB2) in a REXX exec. But, I do not know where the result (number of rows)
>is located. Can anyone help? Instead of using the COUNT, I could use
>EXECIO and read in the data to get the number of rows after selecting.
>But, I would prefer to use COUNT.
>
>Thank you in advance for any help.
>
>------------------------------------------------------------------
>From: Daryl Wells
> DB/DC Support
> IBM Global Services
> Tie Line 427-7487
> Phone (813) 801-7487
> Pager (800) 759-8888 pin 1366198 or
>http://www.skytel.com/Paging/index.html


Regards,

Bob Stark [ProTech - When you're serious about Systems Management]
www.protechpts.com 800-373-9188 x150



Sat Jul 8, 2000 1:50 pm

bstark@...
Send Email Send Email

Forward
Message #6291 of 16003 |
Expand Messages Author Sort by Date

I am trying to use COUNT in a SQL SELECT statement using RXSQL (against DB2) in a REXX exec. But, I do not know where the result (number of rows) is located....
Daryl Wells
dwwell1@...
Send Email
Jul 7, 2000
7:29 pm

I think the trick is to use SELECT COUNT(*) INTO :hostvar, so that you can control where the result of the count function is placed. I haven't done this with...
Bob Stark
bstark@...
Send Email
Jul 8, 2000
1:53 pm

This solution has more lines that I will like, but it works. ________________________________________________________________________ /* Trabajo con SQL para...
Raul Jager
raul@...
Send Email
Jul 10, 2000
4:52 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help