Hi John,
I have indexed the key table fields necessary for my
Query, and I'm pretty sure I haven't used the functions
that you mentioned. Here is the actual SQL since I'm not
sure if it is too big or not. This is merely a
demonstration of its size, since it would be awkward to
try and format it so it is legible.
Thanks,
Cameron
SELECT [Associates Join 1].[Associate ID], Titles.[Title
Name], [Associates Join 1].Last_Name, [Associates Join
1].First_Name, [Associates Join 1].Maiden_Name,
Area_Codes.[Area Code], [Associates Join 1].Phone_Number,
Regions.Name, [Associates Join 1].Background,
Gender.Gender_Name, Years.Year, Year(Date())-[Year] AS
Expr1, Boolean.Type, [Associates Join 1].Street, Cities.
[City Name], [Associates Join 1].Postal_Code, Provinces.
[Province Name], [Associates Join 1].Start_Date,
[Associates Join 1].Police_Check, DateDiff("m",
[Start_Date],Date()) AS Expr2, [Associates Join 1].[First
Name], Certification_Categories.[Cert Name],
Certification_Categories_1.[Cert Name], Degrees.[Degree
Name], Degrees_1.[Degree Name], [Associates Join
1].Admin_Fee, [Associates Join 1].Company, Area_Codes_1.
[Area Code], [Associates Join 1].Cell_Phone_Number,
[Associates Join 1].Email_Address, [Associates Join 1].
[AISI_ Provider_Number], [Associates Join
1].Associate_Password, [Associates Join
1].Coordinator_Category, [Associates Join
1].Area_Code_Category, Area_Codes.[Area Code ID],
[Associates Join 1].Region_Category, [Associates Join
1].City_Category, Boolean_1.Type, Boolean_2.Type,
Boolean_3.Type, Boolean_4.Type, [Associates Join
1].CPI_or_UMVB, Languages.Language_Name, [Associates Join
1].Gender, [Associates Join 1].Active,
Experiences.Experience, Year(Date())-Year([Police_Check])
AS Expr3, [Associates Join 1].Certification_1,
[Associates Join 1].Certification_2, [Associates Join 1].
[Degree/Diploma_1], [Associates Join 1].
[Degree/Diploma_2], [Associates Join 1].Second_Language,
[Associates Join 1].Worked_Mostly_In, [Associates Join
1].Current_Contract, Contract_Periods.Contract_Period
FROM Contract_Periods INNER JOIN (Experiences INNER JOIN
(Languages INNER JOIN (Boolean AS Boolean_5 INNER JOIN
(Boolean AS Boolean_4 INNER JOIN (Boolean AS Boolean_3
INNER JOIN (Boolean AS Boolean_2 INNER JOIN (Boolean AS
Boolean_1 INNER JOIN (Degrees AS Degrees_1 INNER JOIN
(Certification_Categories AS Certification_Categories_1
INNER JOIN (Area_Codes AS Area_Codes_1 INNER JOIN
(Degrees INNER JOIN (Certification_Categories INNER JOIN
(Provinces INNER JOIN (Cities INNER JOIN (Boolean INNER
JOIN (Gender INNER JOIN (Years INNER JOIN (Regions INNER
JOIN (Area_Codes INNER JOIN (Titles INNER JOIN
[Associates Join 1] ON Titles.[Title ID] = [Associates
Join 1].Title) ON Area_Codes.[Area Code ID] = [Associates
Join 1].Area_Code_Category) ON Regions.[Region ID] =
[Associates Join 1].Region_Category) ON Years.Year_ID =
[Associates Join 1].YOB) ON Gender.[Gender ID] =
[Associates Join 1].Gender) ON Boolean.[Boolean ID] =
[Associates Join 1].Ability_to_Travel) ON Cities.[City
ID] = [Associates Join 1].City_Category) ON Provinces.
[Province ID] = [Associates Join 1].Province_Category) ON
Certification_Categories.[Cert ID] = [Associates Join
1].Certification_1) ON Degrees.[Degree ID] = [Associates
Join 1].[Degree/Diploma_1]) ON Area_Codes_1.[Area Code
ID] = [Associates Join 1].Cell_Area_Code_Category) ON
Certification_Categories_1.[Cert ID] = [Associates Join
1].Certification_2) ON Degrees_1.[Degree ID] =
[Associates Join 1].[Degree/Diploma_2]) ON Boolean_1.
[Boolean ID] = [Associates Join 1].Active) ON Boolean_2.
[Boolean ID] = [Associates Join
1].Associate_Information_Form) ON Boolean_3.[Boolean ID]
= [Associates Join 1].Contract_Signed) ON Boolean_4.
[Boolean ID] = [Associates Join 1].
[Harassment_&_Abuse_Policy]) ON Boolean_5.[Boolean ID] =
[Associates Join 1].CPI_or_UMVB) ON Languages.Language_ID
= [Associates Join 1].Second_Language) ON
Experiences.Experience_ID = [Associates Join
1].Worked_Mostly_In) ON
Contract_Periods.Contract_Period_ID = [Associates Join
1].Current_Contract
ORDER BY [Associates Join 1].Last_Name, [Associates Join
1].First_Name;