Hi,
Please help me to construct the subquery.
I have a query that returns either one or two records.
If query returns two records, one record will always have value "RB", and the second could have anything.
Select NAME from transits where transit=5
NAME:
RB
ST
I need to create a subquery, that will do the following
If my main query returns two records then show only one record (the one that not equal to RB)
If my main query returns one record, then show this one record no matter what it is.
Please help me.
I know I could simply do that using a few SQL statements inside my VBA code.
But I need to do that using ONE query
I will appreciate your help
Thanks.
Please help me to construct the subquery.
I have a query that returns either one or two records.
If query returns two records, one record will always have value "RB", and the second could have anything.
Select NAME from transits where transit=5
NAME:
RB
ST
I need to create a subquery, that will do the following
If my main query returns two records then show only one record (the one that not equal to RB)
If my main query returns one record, then show this one record no matter what it is.
Please help me.
I know I could simply do that using a few SQL statements inside my VBA code.
But I need to do that using ONE query
I will appreciate your help
Thanks.