Do Not select records if duplication in specific field
Hi. I have a table with several fields. Some records will have the same information in certain fields but different info in other fields. Three fields in question are: [CaseID], [Batch], and [Trip].
Suppose there are 3 records in the table. Two of which have the same [CaseID], one of these two will have [Batch] Null and [Trip] Not Null, the other will have [Batch] Not Null and [Trip] Null.
The third record has a unique [CaseID], [Batch] Not Null and [Trip] Null.
I need to select all records but if the [CaseID] is the same, then only take the record where the [Trip] Is Not Null.
I'd appreciate any help at all!
Hi. I have a table with several fields. Some records will have the same information in certain fields but different info in other fields. Three fields in question are: [CaseID], [Batch], and [Trip].
Suppose there are 3 records in the table. Two of which have the same [CaseID], one of these two will have [Batch] Null and [Trip] Not Null, the other will have [Batch] Not Null and [Trip] Null.
The third record has a unique [CaseID], [Batch] Not Null and [Trip] Null.
I need to select all records but if the [CaseID] is the same, then only take the record where the [Trip] Is Not Null.
I'd appreciate any help at all!
Last edited: