Backboards: 
Posts: 167

LIR: Jax. I think you can kinda "trick" it into generating a subquery like this using CONCATENATE

SELECT helpdesk_escalatedcount.[Taken By], helpdesk_notescalatedcount.LevelOneCalls, helpdesk_escalatedcount.LevelTwoCalls, [LevelTwoCalls]/[LevelOneCalls] AS PercentEscalated,

CONCATENATE("SELECT TOP 1 COUNT(application) FROM othertable WHERE name = " & helpdesk_escalatedcount.[Taken By] & " ORDER BY COUNT(application) DESC") as appcount

FROM helpdesk_escalatedcount
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.