Mensaje
 
a
11/06/2008 12:49:13
General information
Foro:
Visual FoxPro
Category:
Bases de datos, tablas, vistas, índices y SQL
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
ID de la conversación:
01323156
ID del mensaje:
01323166
Views:
12
This message has been marked as the solution to the initial question of the thread.
>I am using SPT to get remote data from two tables.
>
>One table(Task Table) has a field called schuledhours. The second table(Assignments Table) is a child of table one with a field called assignedhours. I need a sql that lists the scheduledhours, sum of assignedhours.
select Task.*, AssignedHours from Task ;
inner join (select sum(AssignedHours) as AssignedHours, ParentID ;
from Assignments group by ParentID) sqlChild on Task.ID = sqlChild.ParentID
If it's not broken, fix it until it is.


My Blog
Previous
Responder
Mapa
Ver