Hi all,
I am looking to categorise the records in my database based on two fields, say [Rec_Type] and [Rec_Age].
I have my categories in a table like this:
I am looking to build a SELECT query that can compare Main.[Rec_Type] with Cat.[Rec_Type] along with if Main.[Rec_Age] is between Cat.[Age_Min] & Cat.[Age_Max], and output Cat.[Cat_Desc].
I'm drawing a blank on the first step, can anyone point me in the right direction?
Thanks
I am looking to categorise the records in my database based on two fields, say [Rec_Type] and [Rec_Age].
I have my categories in a table like this:
Code:
[Rec_Type] [Age_Min] [Age_Max] [Cat_Desc]
TypeFoo 0 12 TypeFoo 0-12 months
TypeFoo 13 24 TypeFoo 13-24 months
TypeMan 0 4 TypeMan 0-4 months
TypeMan 5 8 TypeMan 5-8 months
TypeMan 9 12 TypeMan 9-12 months
TypeMan 13 24 TypeMan 13-24 months
TypeChu 0 24 TypeChu 0-24 months
TypeChu 25 99 TypeChu 25+ months
I'm drawing a blank on the first step, can anyone point me in the right direction?
Thanks