In response to
"LIR: Jax. I think you can kinda "trick" it into generating a subquery like this using CONCATENATE"
by
kilboooo
|
Another option that might make more sense is to use a JOIN to a subquery. I'm not sure the syntax is exact but it's more "standard" than the concat
Posted by
kilboooo (aka kkuphal)
Oct 28 '08, 08:00
|
SELECT helpdesk_escalatedcount.[Taken By], helpdesk_notescalatedcount.LevelOneCalls, helpdesk_escalatedcount.LevelTwoCalls, [LevelTwoCalls]/[LevelOneCalls] AS PercentEscalated,
apptable.appcount
FROM helpdesk_escalatedcount
LEFT JOIN (SELECT name, COUNT(application) as appcount FROM othertable) ON othertable.name = helpdesk_escalatedcount.[Taken By]
INNER JOIN
helpdesk_notescalatedcount ON helpdesk_escalatedcount.[Taken By] = helpdesk_notescalatedcount.[Taken By];
|
Responses:
|