M
Mary
The following query is returning duplicate rows from both tblBatchHeader and
tblLines. I just want duplicates from the tblLines. How do I do this with my
query?
Result:
idsBatch
HeaderID Batch_Header
240 $X692;908 DATA PROCESSING
240 1000000001
240 1000000001
240 $X692;908 DATA PROCESSING (I don't need the extra line here.)
Query:
SELECT BH.idsBatchHeaderID, UCASE([chrDescription]) AS Batch_Header
FROM tblBatchHeader AS BH LEFT JOIN tblLLines AS L ON BH.idsBatchHeaderID =
L.lngzBatchHeaderID;
UNION ALL
SELECT lngzBatchHeaderID, lngzPatientNumberAS Lines FROM tblLLines
WHERE chrTransCode1 = "L"
order by idsBatchHeaderID;
tblLines. I just want duplicates from the tblLines. How do I do this with my
query?
Result:
idsBatch
HeaderID Batch_Header
240 $X692;908 DATA PROCESSING
240 1000000001
240 1000000001
240 $X692;908 DATA PROCESSING (I don't need the extra line here.)
Query:
SELECT BH.idsBatchHeaderID, UCASE([chrDescription]) AS Batch_Header
FROM tblBatchHeader AS BH LEFT JOIN tblLLines AS L ON BH.idsBatchHeaderID =
L.lngzBatchHeaderID;
UNION ALL
SELECT lngzBatchHeaderID, lngzPatientNumberAS Lines FROM tblLLines
WHERE chrTransCode1 = "L"
order by idsBatchHeaderID;