M
MikeB
I have a union query. One of the fields I'm trying to include in the
query is a Yes/No field.
In the Union Query, the field does not show as a little checkbox, but
rather as a field with a value of -1 for Yes and 0 for No. How do I
preserve the field type?
Here is the query:
SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"White" as [Color], [Black] as [OpponentNumber], [WhiteScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)
UNION SELECT [GameNumber], [MatchNumber], [Black] as [PlayerNumber],
"Black" as [Color],[White] as [OpponentNumber], [BlackScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)
UNION SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"Bye" as [Color], Null as [OpponentNumber], [WhiteScore] as [Score],
Null as [Duration], Null as [Moves], [Rated]
FROM [Games]
WHERE [IsBye] = Yes;
query is a Yes/No field.
In the Union Query, the field does not show as a little checkbox, but
rather as a field with a value of -1 for Yes and 0 for No. How do I
preserve the field type?
Here is the query:
SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"White" as [Color], [Black] as [OpponentNumber], [WhiteScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)
UNION SELECT [GameNumber], [MatchNumber], [Black] as [PlayerNumber],
"Black" as [Color],[White] as [OpponentNumber], [BlackScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)
UNION SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"Bye" as [Color], Null as [OpponentNumber], [WhiteScore] as [Score],
Null as [Duration], Null as [Moves], [Rated]
FROM [Games]
WHERE [IsBye] = Yes;