Can I pick your brains about how to best transform the following from a select statement a transform. In an MDB, I would just use the crosstab query wizard but that's not an option in an ADP. Thanks.
SELECT dbo.VM_Users.FirstName, dbo.VM_Users.LastName, COUNT(dbo.ED_Caller_VM_Leads.lCallResult) AS [COUNT],
dbo.ED_Caller_VM_Leads.lCallResult AS DISP, LEFT(dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp, 11) AS DATE2
FROM dbo.ED_Caller_VM_Leads INNER JOIN
dbo.VM_Users ON dbo.ED_Caller_VM_Leads.lUserID = dbo.VM_Users.lUserID
GROUP BY dbo.VM_Users.FirstName, dbo.VM_Users.LastName, LEFT(dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp, 11),
dbo.ED_Caller_VM_Leads.lCallResult, DATEPART(mm, dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp)
HAVING (DATEPART(mm, dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp) = 8)
into a crosstab type of layout using the TRASFORM statement.
I'd like counts by rep by date by disposition (lcallresult). Right now, I take the data and throw it into a pivot table. I'd like each disposition to be a separate column with counts by date by rep.
SELECT dbo.VM_Users.FirstName, dbo.VM_Users.LastName, COUNT(dbo.ED_Caller_VM_Leads.lCallResult) AS [COUNT],
dbo.ED_Caller_VM_Leads.lCallResult AS DISP, LEFT(dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp, 11) AS DATE2
FROM dbo.ED_Caller_VM_Leads INNER JOIN
dbo.VM_Users ON dbo.ED_Caller_VM_Leads.lUserID = dbo.VM_Users.lUserID
GROUP BY dbo.VM_Users.FirstName, dbo.VM_Users.LastName, LEFT(dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp, 11),
dbo.ED_Caller_VM_Leads.lCallResult, DATEPART(mm, dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp)
HAVING (DATEPART(mm, dbo.ED_Caller_VM_Leads.dtmED_Caller_TimeStamp) = 8)
into a crosstab type of layout using the TRASFORM statement.
I'd like counts by rep by date by disposition (lcallresult). Right now, I take the data and throw it into a pivot table. I'd like each disposition to be a separate column with counts by date by rep.