JeffreyLSmith
IS-IT--Management
I've added several sum functions to the query string which is "ok" per the Data Env. designer, but VB returns an error upon execution. The error appears to be within a previously working section of the query, ala before the sum functions were added. Here is the query:
"SELECT SUM(Mon) AS MonHrs, SUM(Tue) AS TueHrs,
SUM(Wed) AS WedHrs, SUM(Thu) AS ThuHrs,
SUM(Fri) AS FriHrs, SUM(Sat) AS SatHrs,
SUM(Sun) AS SunHrs,
Project, Task,
Mon, Tue, Wed, Thu, Fri, Sat, Sun,
Purpose, Issue, WeekEnding,
EmployeeName, ID
FROM tblTimeEntries
WHERE WeekEnding = 'sWeekEnding' AND
EmployeeName = 'sCurrentUser'"
It now bombs with this error:
"you tried to execute a query which does not include the specified expression 'Project' as part of an aggregate function"
????? Again, the DE designer checked the syntax with no problems but Visual Basic is dumping? Any help?
"SELECT SUM(Mon) AS MonHrs, SUM(Tue) AS TueHrs,
SUM(Wed) AS WedHrs, SUM(Thu) AS ThuHrs,
SUM(Fri) AS FriHrs, SUM(Sat) AS SatHrs,
SUM(Sun) AS SunHrs,
Project, Task,
Mon, Tue, Wed, Thu, Fri, Sat, Sun,
Purpose, Issue, WeekEnding,
EmployeeName, ID
FROM tblTimeEntries
WHERE WeekEnding = 'sWeekEnding' AND
EmployeeName = 'sCurrentUser'"
It now bombs with this error:
"you tried to execute a query which does not include the specified expression 'Project' as part of an aggregate function"
????? Again, the DE designer checked the syntax with no problems but Visual Basic is dumping? Any help?