GK in the UK
Registered User.
- Local time
- Today, 17:04
- Joined
- Dec 20, 2017
- Messages
- 274
Can I join a table on an expression ?
I have a field in a table called thAcYrPrd which is a long in the format 202006 where 06 = 6th period of year 2020. I decided to do it this way because it makes selection between a period range in the query straightforward. (Periods do not necessarily have any relationship to dates).
I have two redundant fields thAcYr and thAcPrd which store 2020 and 6 respectively and when I made the change to the longer numeric format I knew these fields would have to go.
Now I'm attempting to remove them, but thAcPrd (6) is JOINed to a table, PrdNames.
I can get the period portion (6) out of the longer format (202006) in the query but I find I can't join the PrdNames table. I went into the SQL statement and changed the join to the expression but Access says it can't support it.
So ... is there a way, or must I leave the period part as a duplicate field in the table ?
I have a field in a table called thAcYrPrd which is a long in the format 202006 where 06 = 6th period of year 2020. I decided to do it this way because it makes selection between a period range in the query straightforward. (Periods do not necessarily have any relationship to dates).
I have two redundant fields thAcYr and thAcPrd which store 2020 and 6 respectively and when I made the change to the longer numeric format I knew these fields would have to go.
Now I'm attempting to remove them, but thAcPrd (6) is JOINed to a table, PrdNames.
I can get the period portion (6) out of the longer format (202006) in the query but I find I can't join the PrdNames table. I went into the SQL statement and changed the join to the expression but Access says it can't support it.
So ... is there a way, or must I leave the period part as a duplicate field in the table ?