Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass Through issue
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01342682
Message ID:
01342696
Views:
10
I'd try putting it into a text block
m.nConnectionHandle = SQLCONNECT('TimeClockPlus')
cCostCode = '11708'
TEXT TO lcCmd noShow


SELECT TOP 100 PERCENT cast(dbo.EmployeeHours.EmployeeId as TinyInt) as EmployeeID, 
	RTRIM(dbo.EmployeeList.FirstName) + ' ' + RTRIM(dbo.EmployeeList.LastName) AS Name, 
	SUM(ROUND({ fn HOUR(dbo.EmployeeHours.TimeOut) } + CAST({ fn MINUTE(dbo.EmployeeHours.TimeOut) } AS DECIMAL) / 60, 2) 
	- ROUND({ fn HOUR(dbo.EmployeeHours.TimeIn) } + CAST({ fn MINUTE(dbo.EmployeeHours.TimeIn) } AS DECIMAL) / 60, 2)) AS Hours1
	
FROM   dbo.EmployeeHours INNER JOIN;
       dbo.EmployeeList ON dbo.EmployeeHours.EmployeeId = dbo.EmployeeList.EmployeeId
WHERE  (dbo.EmployeeHours.CostCode = ?cCostCode)
GROUP BY dbo.EmployeeHours.EmployeeId, RTRIM(dbo.EmployeeList.FirstName)+' '+RTRIM(dbo.EmployeeList.LastName)
ORDER BY dbo.EmployeeHours.EmployeeId,QueryName

ENDTEXT 

=SQLEXEC(m.nConnectionHandle,lcCmd)

BROWSE LAST NOWAIT

SQLDISCONNECT(m.nConnectionHandle)
Previous
Reply
Map
View

Click here to load this message in the networking platform