Hi,
How do I ensure that DISTINCT values of r.GPositionID are returned from the below??
Thanks.
How do I ensure that DISTINCT values of r.GPositionID are returned from the below??
Code:
SELECT CommentImage AS ViewComment,r.GPositionID,GCustodian,GCustodianAccount,GAssetType FROM @GResults r LEFT OUTER JOIN ReconComments cm ON cm.GPositionID = r.GPositionID WHERE r.GPositionID NOT IN (SELECT g.GPositionID FROM ReconGCrossReference g) ORDER BY GCustodian, GCustodianAccount, GAssetType;
Comment