I'm not sure I understand the question. Can you please post a full repro script?
(I.e., CREATE TABLE statements for all tables involved, INSERT statements with just enough rows to show the problem, the statement you executed, the results you got, and the results you wanted to get).
An explanation of what you are trying to achieve and why you are doing this can also help.