J
James Parham
I have two queries that work exactly the way I want them to. The difference
between the two is that one query looks for a value of 1 in FloatTable.Val,
using tAlarms_OFF_IS_OK in the criteria, while the other query looks for a
value of 0 in FloatTable.Val, using tAlarms_ON_IS_OK in its criteria:
SELECT FloatTable.DateAndTime, TagTable.TagName,
tAlarms_OFF_IS_OK.Description
FROM tAlarms_OFF_IS_OK INNER JOIN (TagTable INNER JOIN FloatTable ON
TagTable.TagIndex = FloatTable.TagIndex) ON tAlarms_OFF_IS_OK.Name =
TagTable.TagName
WHERE (((FloatTable.Val)=1));
SELECT FloatTable.DateAndTime, TagTable.TagName,
tAlarms_ON_IS_OK.Description
FROM tAlarms_ON_IS_OK INNER JOIN (TagTable INNER JOIN FloatTable ON
TagTable.TagIndex = FloatTable.TagIndex) ON tAlarms_ON_IS_OK.Name =
TagTable.TagName
WHERE (((FloatTable.Val)=0));
The problem I have is that using the above queries requires that I run two
separate queries and that I work with two separate result recordsets. What
I want to do is combine both queries into a single SQL statement that
returns one recordset. (Or if that isn't possible, modify the two queries
so they combine both recordset results into a single recordset.)
Anyone know how this might be accomplished?
between the two is that one query looks for a value of 1 in FloatTable.Val,
using tAlarms_OFF_IS_OK in the criteria, while the other query looks for a
value of 0 in FloatTable.Val, using tAlarms_ON_IS_OK in its criteria:
SELECT FloatTable.DateAndTime, TagTable.TagName,
tAlarms_OFF_IS_OK.Description
FROM tAlarms_OFF_IS_OK INNER JOIN (TagTable INNER JOIN FloatTable ON
TagTable.TagIndex = FloatTable.TagIndex) ON tAlarms_OFF_IS_OK.Name =
TagTable.TagName
WHERE (((FloatTable.Val)=1));
SELECT FloatTable.DateAndTime, TagTable.TagName,
tAlarms_ON_IS_OK.Description
FROM tAlarms_ON_IS_OK INNER JOIN (TagTable INNER JOIN FloatTable ON
TagTable.TagIndex = FloatTable.TagIndex) ON tAlarms_ON_IS_OK.Name =
TagTable.TagName
WHERE (((FloatTable.Val)=0));
The problem I have is that using the above queries requires that I run two
separate queries and that I work with two separate result recordsets. What
I want to do is combine both queries into a single SQL statement that
returns one recordset. (Or if that isn't possible, modify the two queries
so they combine both recordset results into a single recordset.)
Anyone know how this might be accomplished?