MIDRANGE dot COM Mailing List Archive



MIDRANGE-L » February 2013

Re: SQL Break/total question



If you are on V7 (or I think V6), there is a rollup feature. With the addition below you should get sub-totals and LGDATE, and a grand total. This might be what you want. Or not.

SELECT LGSESN, LGDATE FROM anloga
WHERE LGSESN NOT LIKE '%ARCHIVE%'
group by LGSESN, LGDATE
with rollup -- <<<<<<<<< Add this
order by LGSESN, LGDATE

Sam

On 2/22/2013 11:20 AM, fbocch2595@xxxxxxx wrote:

Hi Vern, your command gave me what I want...how can I add the LGDATE field to this and still get the break and total?

SELECT LGSESN, COUNT(*) AS SESNCNT FROM anloga
HERE LGSESN NOT LIKE '%ARCHIVE%'
ROUP BY LGSESN
rder by LGSESN





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2013 by MIDRANGE dot 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 here. If you have questions about this, please contact