Hi Desmond

Ed answered your question. SET ENGINEBEHAVIOR 70 should be avoided.
When in Rome, (or VFP 9), do as the Romans do.

Of the date field per current employee records, which date do you want
to see per employee summary record? Their first date, their last date
or some date in between? That's one example of the problems with
enginebehavior 70 queries.

Change date to max(date) and your query should work with SET ENGINEBEHAVIOR 90.

Message: 7
Date: Mon, 07 Aug 2006 17:13:56 +0000
From: "Desmond Lloyd" <[EMAIL PROTECTED]>
Subject: VFP9:  SQL Help
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed

Help!

Am attempting to summarize employee hours coming from two separate files,
current and history.

The following statement works when summarizing time reported for employees.

mfilt is a "built" where clause,  primarily defining a date range. (in this
case 08/04)
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

Works fine for all employees except for one,  where the time_total is equal
on both sides.  Changing one of the totals if I separate out the "current"
and "history" cursors allows that employee to calculate properly.  For the
one employee it only selects one record, if I change one of the totals I get
two???

Hope this makes sense.
Any suggestions?

TIA,
Desmond
8-)




[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
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