Backboards: 
Posts: 167
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

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:
Post a message   top
Replies are disabled on threads older than 7 days.