A
aireq
I have a Query called [Building Stories] which contains two fields [Building
ID] and [Stories]. I also have a table called [Building Type Codes] which
lists a range of building types and a minimum and maximum number of stories
which would identify a building as being in that type. Thus [Building Type
Codes] has fields [Building Type Code], [Min Floors], and [Max Floors]
I'm trying to create a query that will combine [Building Stories] and
[Building Type Codes] which will list all the buildings and their derived
type. So I created a query that selects [Building ID] and [Stories] from
[Building Stories], and then has a sub query that selects the [Building Type
Code] from [Building Type Codes] where [Stories] is between [Min Floors] and
[Max Floors]. My SQL command is below.
Whenever I try to run this query I get the error: "Unknown Access database
error"
Can someone tell me what I'm doing wrong? I'm new the Access and all this
SQL query stuff.
SELECT [Building Stories].[Building ID], [Building Stories].Stories, (SELECT
[Building Type Code] FROM [Building Type Codes] WHERE [Stories] Between
[Building Type Codes]![Min Floors] And [Building Type Codes]![Max Floors]) AS
[Building Type]
FROM [Building Stories];
ID] and [Stories]. I also have a table called [Building Type Codes] which
lists a range of building types and a minimum and maximum number of stories
which would identify a building as being in that type. Thus [Building Type
Codes] has fields [Building Type Code], [Min Floors], and [Max Floors]
I'm trying to create a query that will combine [Building Stories] and
[Building Type Codes] which will list all the buildings and their derived
type. So I created a query that selects [Building ID] and [Stories] from
[Building Stories], and then has a sub query that selects the [Building Type
Code] from [Building Type Codes] where [Stories] is between [Min Floors] and
[Max Floors]. My SQL command is below.
Whenever I try to run this query I get the error: "Unknown Access database
error"
Can someone tell me what I'm doing wrong? I'm new the Access and all this
SQL query stuff.
SELECT [Building Stories].[Building ID], [Building Stories].Stories, (SELECT
[Building Type Code] FROM [Building Type Codes] WHERE [Stories] Between
[Building Type Codes]![Min Floors] And [Building Type Codes]![Max Floors]) AS
[Building Type]
FROM [Building Stories];