Your question is rather vague. Can you supply the table definitions, some sample data and the results you require.
To do this to make it possible for someone to give you a tested answer, please click on the first link in my signature block and post the table definitions, sample data , etc
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read[/url]
Before posting a performance problem please read[/url]