O
Offace
Hello Newsgroup,
I have three tables set up as such;
tblFilter:
ID------Name
1 Gender
2 Age
tblFilterValue
ID-----FilterID-----Value-----ValueTag
1 1 1 Male
2 1 2 Female
3 2 1 Teens
4 2 2 Twenties
5 2 3 Thirties
6 2 4 Forties
7 2 5 Fifties
8 2 6 Seniors
tblFilterData
FilterID-----Index-----Value
1 1 1
1 2 1
1 3 1
1 4 2
1 5 2
1 6 2
1 7 2
1 8
1 9 2
1 10 1
2 1 3
2 2 3
2 3 2
2 4 3
2 5 2
2 6
2 7
2 8 2
2 9 4
2 10 1
At the table end the relationships are basically as follows (in classical
1-many fashion);
[tblFilter].[ID]----[tblFilterValue].[FilterID] and
[tblFilter].[ID]----[tblFilterData].[FilterID] with R.I enforced.
I have another relationship without enforcing R.I (many-many);
[tblFilterValue].[Value]----[tblFilterData].[Value].
Via a query the user is able to view data for a specific filter from the
'tblFilterData' table as well as the appropriate value name from
[tblFilterValue].[ValueTag] related table field. The SQL looks like this;
[qselFilterData]
PARAMETERS [filterID] Long;
SELECT [D].[Index], [D].[Value], [V].[ValueTag]
FROM [tblFilterData] AS D INNER JOIN [tblFilterValue] AS V ON ([D].[Value] =
[V].[Value]) AND ([D].[FilterID] = [V].[FilterID])
WHERE ([V].[FilterID]=filterID)
ORDER BY [D].[Index] ASC;
This query does the job but NULL values steaming from the 'tblFilterData'
table don't follow through into the query. How do I acheive (sorry about
the
long post) this;
[qselFilterData] :: WHERE ([FilterID]=2)
Index-----Value----ValueTag
1 3 Thirties
2 3 Thirties
3 2 Twenties
4 3 Thirties
5 2 Twenties
6
7
8 2 Twenties
9 4 Forties
10 1 Teens
I.e the NULL values still appear in the query, rather than records 6 and 7
not coming through. Many thanks in advance all help is deeply appreciated.
Regards,
Offace.
I have three tables set up as such;
tblFilter:
ID------Name
1 Gender
2 Age
tblFilterValue
ID-----FilterID-----Value-----ValueTag
1 1 1 Male
2 1 2 Female
3 2 1 Teens
4 2 2 Twenties
5 2 3 Thirties
6 2 4 Forties
7 2 5 Fifties
8 2 6 Seniors
tblFilterData
FilterID-----Index-----Value
1 1 1
1 2 1
1 3 1
1 4 2
1 5 2
1 6 2
1 7 2
1 8
1 9 2
1 10 1
2 1 3
2 2 3
2 3 2
2 4 3
2 5 2
2 6
2 7
2 8 2
2 9 4
2 10 1
At the table end the relationships are basically as follows (in classical
1-many fashion);
[tblFilter].[ID]----[tblFilterValue].[FilterID] and
[tblFilter].[ID]----[tblFilterData].[FilterID] with R.I enforced.
I have another relationship without enforcing R.I (many-many);
[tblFilterValue].[Value]----[tblFilterData].[Value].
Via a query the user is able to view data for a specific filter from the
'tblFilterData' table as well as the appropriate value name from
[tblFilterValue].[ValueTag] related table field. The SQL looks like this;
[qselFilterData]
PARAMETERS [filterID] Long;
SELECT [D].[Index], [D].[Value], [V].[ValueTag]
FROM [tblFilterData] AS D INNER JOIN [tblFilterValue] AS V ON ([D].[Value] =
[V].[Value]) AND ([D].[FilterID] = [V].[FilterID])
WHERE ([V].[FilterID]=filterID)
ORDER BY [D].[Index] ASC;
This query does the job but NULL values steaming from the 'tblFilterData'
table don't follow through into the query. How do I acheive (sorry about
the
long post) this;
[qselFilterData] :: WHERE ([FilterID]=2)
Index-----Value----ValueTag
1 3 Thirties
2 3 Thirties
3 2 Twenties
4 3 Thirties
5 2 Twenties
6
7
8 2 Twenties
9 4 Forties
10 1 Teens
I.e the NULL values still appear in the query, rather than records 6 and 7
not coming through. Many thanks in advance all help is deeply appreciated.
Regards,
Offace.