Forgive the outburst, but

Wooohooooo!!! Union all did it!

Had worked on this for several hours the other day making sure that the totals and details matched an existing report, thought I was done until this....

Regards,
Desmond
8-)





From: "Ted Roche" <[EMAIL PROTECTED]>
Reply-To: ProFox Email List <profox@leafe.com>
To: profox@leafe.com
Subject: Re: VFP9: SQL Help
Date: Mon, 7 Aug 2006 13:37:31 -0400

On 8/7/06, Desmond Lloyd <[EMAIL PROTECTED]> wrote:
set enginebehavior is set to 70 because it balks at my sum(time) statements,
"group by is invalid"

Select prempl,date,Sum(time) as time_total, From current_labor  &mfilt ;
union
Select prempl,date,Sum(time) as time_total, From history_labor &mfilt into
Cursor whatever


WIthout mfilt, it's a little more interesting to guess. Try: UNION ALL.

You should be able to run this as a legitimate 9.0 SQL statement.
MAX() all the fields you expect the same value in every row. Group by
all the other non-aggregate fields.

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to