Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
workindan
Starting Member
21 Posts |
Posted - 2012-01-09 : 12:20:25
|
| Can anyone spot the syntax error? I wouldn't have a problem in SQL Server, but Jet SQL in Access is giving me a headache...can't seem to get the subquery to work even though both queries work on their own.-------SELECT dbo_MSMYB_Contacts.UserID, dbo_MSMYB_Contacts.FirstName, dbo_MSMYB_Contacts.LastName, dbo_MSMYB_Contacts.FLL, count(tmpDB2Run.Category) as Inquiries, count(tmpDB2Run.Drug_Reason) as templates, A.CallsFROM dbo_MSMYB_Contacts INNER JOIN tmpDB2Run ON dbo_MSMYB_Contacts.UserID = tmpDB2Run.CreatedByINNER JOIN (SELECT dbo_MSMYB_Contacts.UserID, sum(root_dagent.acdcalls) as [Calls]FROM dbo_MSMYB_Contacts INNER JOIN root_dagent ON dbo_MSMYB_Contacts.Extension = root_dagent.logidWHERE root_dagent.row_date>=#1/2/2012# And root_dagent.row_date<#1/8/2012#AND (root_dagent.split = 1213 OR root_dagent.split = 1257 OR root_dagent.split = 1258)GROUP BY UserID;) as AON dbo_MSMYB_Contacts.UserID = A.UserIDGROUP BY dbo_MSMYB_Contacts.UserID, dbo_MSMYB_Contacts.FirstName, dbo_MSMYB_Contacts.LastName, dbo_MSMYB_Contacts.FLL; |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
workindan
Starting Member
21 Posts |
Posted - 2012-01-09 : 12:29:45
|
| I usually work in SS but this one I'm doing in MS Access, yes :PRight now it's MS Access Version 14.0.47600.1000 (32-bit) |
 |
|
|
|
|
|
|
|