bs0d
Well-known Member
- Joined
- Dec 29, 2006
- Messages
- 622
I've built a query in Access that has a calculated field, combining strings from fields in multiple tables. I'd like to cut down on the length of the query by referencing this field also in the where clause. Is this possible?
For example, current query:
Above, the where clause specifies the full calculated field. I'd like to just refer to it as "MY_FIELD", but it's not recognizing it. Is this possible?
For example, current query:
Code:
Select
table1.field & " " & table2.field & " " & table 3.field AS MY_FIELD
from table inner join (all the tables by a common key)
Where table1.field & " " & table2.field & " " & table 3.field <> "condition 1", table1.field & " " & table2.field & " " & table 3.field <> "condition 2";
Code:
Where MY_FIELD <> "condition 1" and MY_FIELD <> "condition 2";