Click here to Skip to main content
15,886,513 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi ,finally got the solution instead of distinct i also used groupby it solved my problem

What I have tried:

got the solution
Posted
Updated 7-Mar-17 8:33am
v5
Comments
jgakenhe 2-Dec-16 18:59pm    
Your going to need to find a couple of duplicates and compare each of them very closely, because they're not duplicates. You have so many columns, it is not surprising they appear to be duplicated. I word of advice to fix your problem and boost performance is to only bring back the columns you need.
CHill60 2-Dec-16 20:30pm    
To get a meaningful solution try using Improve question link to give us some sample data from the tables (hint - make sure the sample data produces the problem and make sure it is a small sample). The exercise of finding suitable sample data may actually expose the problem to you
Tomas Takac 7-Mar-17 2:34am    
As it seems there is not a one-to-one relationship between caseinformation and billing. You should investigate that instead trying to go around the problem using distinct or group by.
Richard Deeming 7-Mar-17 14:50pm    
Editing your question to remove the content after a solution has been posted is extremely rude.

1 solution

If your billing table contains more than one billing information for the same case the JOIN will return a complete row for each billing info. A simple example to illustrate this:

caseID = 5

billing info A for caseID 5
billing info B for caseID 5

will return these rows:

5 with A
5 with B
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900