A
Andy G
Can I do this?
FROM dbo_testInformation INNER JOIN
dbo_testAdministered ON dbo.testInformation.Test_ID =
dbo_testAdministered.Test_ID INNER JOIN
dbo_settings ON DatePart("yyyy",
dbo.testAdministered.Date_Completed) =
DatePart("yyyy", dbo.settings.Date)
Below is the full query
SELECT TOP 100 PERCENT dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]) AS Month,
dbo_testInformation.Name, dbo_testInformation.Abbreviaton,
dbo_testAdministered.TestAssignID, DatePart("yyyy",[Date]) AS SetYear,
DatePart("yyyy",[Date_Completed]) AS AdminYear
FROM dbo_testInformation INNER JOIN
dbo_testAdministered ON dbo.testInformation.Test_ID =
dbo_testAdministered.Test_ID INNER JOIN
dbo_settings ON DatePart("yyyy",
dbo.testAdministered.Date_Completed) =
DatePart("yyyy", dbo.settings.Date)
GROUP BY dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]),
dbo_testInformation.Name, dbo_testInformation.Abbreviaton,
dbo_testAdministered.TestAssignID, DatePart("yyyy",[Date]),
DatePart("yyyy",[Date_Completed])
ORDER BY dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]),
dbo_testInformation.Name;
FROM dbo_testInformation INNER JOIN
dbo_testAdministered ON dbo.testInformation.Test_ID =
dbo_testAdministered.Test_ID INNER JOIN
dbo_settings ON DatePart("yyyy",
dbo.testAdministered.Date_Completed) =
DatePart("yyyy", dbo.settings.Date)
Below is the full query
SELECT TOP 100 PERCENT dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]) AS Month,
dbo_testInformation.Name, dbo_testInformation.Abbreviaton,
dbo_testAdministered.TestAssignID, DatePart("yyyy",[Date]) AS SetYear,
DatePart("yyyy",[Date_Completed]) AS AdminYear
FROM dbo_testInformation INNER JOIN
dbo_testAdministered ON dbo.testInformation.Test_ID =
dbo_testAdministered.Test_ID INNER JOIN
dbo_settings ON DatePart("yyyy",
dbo.testAdministered.Date_Completed) =
DatePart("yyyy", dbo.settings.Date)
GROUP BY dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]),
dbo_testInformation.Name, dbo_testInformation.Abbreviaton,
dbo_testAdministered.TestAssignID, DatePart("yyyy",[Date]),
DatePart("yyyy",[Date_Completed])
ORDER BY dbo_testInformation.Category,
DatePart("m",[dbo_testAdministered].[Date_Completed]),
dbo_testInformation.Name;