Thanks Jim.

Actually, I'm fairly competent with SQL already. I use a good bit of
embedded SQL in RPG and use it a lot on the PC as well. Even made a few
stored procedures on the iSeries and called them from C# programs on the
PC.

We don't write a whole lot of new QRY/400 queries as a rule anymore, but
occasionally we need a quick and dirty printed report for which we don't
want to take the time to write a program.

I'll have to take a closer look at QMQRY. More tools in the old utility
belt the better.

G

|-----Original Message-----
|From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
|bounces@xxxxxxxxxxxx] On Behalf Of Jim Essinger
|Sent: Tuesday, October 02, 2007 10:27 AM
|To: Midrange Systems Technical Discussion
|Subject: Re: Summary Output with STRQMQRY
|
|Rob,
|
|Thanks - that's the one. I was on my crackberry at the time and did
not
|have an easy way to look it up,
|
|Greg,
|
|I would encourage you to start converting QRY/400 to QMQRY. There is
so
|much more you can do with QMQRY such as pass parms. It should be
|possible
|to get the results you want with QMQRY and passing a parameter. I have
|started down the path of learning SQL and using QMQRY to do some jobs
|the
|other developers thought a program would have to be written for. While
|it
|would be easiest to write 2 QRY/400 queries to get your results, I
|believe
|it would be worth your time to start on SQL and QMQRY. This list has
|been
|very helpful to me in that process.
|
|Jim
|
|On 10/2/07, Fleming, Greg (ED) <GFLEMING@xxxxxxxxxxxxxxxxxxxx> wrote:
|>
|> We're using STRQMQRY because we need to pass a parameter, and can't
do
|> it with RUNQRY.
|>
|> However, I reckon it may be easiest to just modify my query to
produce
|a
|> file with the detail, then create a second query to summarize it to
|> printed output. Since the second query won't require a parameter, we
|> can just use RUNQRY on it.
|>
|> Thanks
|>
|> |-----Original Message-----
|> |From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
|> |bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
|> |Sent: Tuesday, October 02, 2007 9:04 AM
|> |To: Midrange Systems Technical Discussion
|> |Subject: Re: Summary Output with STRQMQRY
|> |
|> |If you're using a Query/400 definition, and you're not using
RTVQMQRY
|> or
|> |some such thing, then why are you using STRQMQRY and not RUNQRY?
|> |If you ARE using RTVQMQRY, then you should modify the statement
|> produced
|> |and use GROUP BY.
|> |
|> |Rob Berendt
|> |--
|> |Group Dekko Services, LLC
|> |Dept 01.073
|> |PO Box 2000
|> |Dock 108
|> |6928N 400E
|> |Kendallville, IN 46755
|> |http://www.dekko.com
|> |
|> |
|> |
|> |
|> |
|> |"Fleming, Greg \(ED\)" <GFLEMING@xxxxxxxxxxxxxxxxxxxx>
|> |Sent by: midrange-l-bounces@xxxxxxxxxxxx
|> |10/02/2007 08:54 AM
|> |Please respond to
|> |Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
|> |
|> |
|> |To
|> |"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
|> |cc
|> |
|> |Fax to
|> |
|> |Subject
|> |Summary Output with STRQMQRY
|> |
|> |
|> |
|> |
|> |
|> |
|> |We're using STRQMQRY on a Query/400 QRYDFN. The query when run from
|> |Query/400 is defined to return summary records only, but when run
|from
|> |STRQMQRY in a CL program (or interactively), it returns detail.
|> |
|> |I found a post from 2003 which indicated a similar problem, and
|> |suggested running RTVQMFORM to generate a source file from the
|QRYDFN,
|> |then using CRTQMFORM to create a form to use on the STRQMQRY QMFORM
|> |parameter. I tried that, but I still get detail.
|> |
|> |Is there anyway to make this thing give me summary records only ?
|> |
|> |Thanks
|> |
|> |Greg Fleming
|> |
|> |Senior Programmer/Analyst
|> |
|> |Everglades Direct, Inc.
|> |
|> |
|> |
|> |--
|> |This is the Midrange Systems Technical Discussion (MIDRANGE-L)
|mailing
|> |list
|> |To post a message email: MIDRANGE-L@xxxxxxxxxxxx
|> |To subscribe, unsubscribe, or change list options,
|> |visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|> |or email: MIDRANGE-L-request@xxxxxxxxxxxx
|> |Before posting, please take a moment to review the archives
|> |at http://archive.midrange.com/midrange-l.
|> |
|> |
|> |--
|> |This is the Midrange Systems Technical Discussion (MIDRANGE-L)
|mailing
|> |list
|> |To post a message email: MIDRANGE-L@xxxxxxxxxxxx
|> |To subscribe, unsubscribe, or change list options,
|> |visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|> |or email: MIDRANGE-L-request@xxxxxxxxxxxx
|> |Before posting, please take a moment to review the archives
|> |at http://archive.midrange.com/midrange-l.
|>
|>
|> --
|> This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
|> list
|> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
|> To subscribe, unsubscribe, or change list options,
|> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|> or email: MIDRANGE-L-request@xxxxxxxxxxxx
|> Before posting, please take a moment to review the archives
|> at http://archive.midrange.com/midrange-l.
|>
|>
|--
|This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
|list
|To post a message email: MIDRANGE-L@xxxxxxxxxxxx
|To subscribe, unsubscribe, or change list options,
|visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|or email: MIDRANGE-L-request@xxxxxxxxxxxx
|Before posting, please take a moment to review the archives
|at http://archive.midrange.com/midrange-l.



This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].