SELECT DISTINCT (ASampleName, BSampleName )
I think you cannot use distinct that way.......did u try it directly in the database?