List:General Discussion« Previous MessageNext Message »
From:Gary Smith Date:January 2 2010 12:49pm
Subject:Re: Render row without duplicates
View as plain text  
bharani kumar wrote:
> Hi
>
> My fields something like
>
> hospital1,hospital2,hospital3,patientname,
>   
[...]
> i know , i can display all hospital code with unique , but i dont in the
> single column , with unique record,
>
> Can you tell me how to do this ?
>   
Would it be possible to reconsider your table design?

Instead of having the above, have something such as:

Person(ID,Name)

Hospital(ID,Name,Code)

LinkTable(ID,PersonID,HospitalID)

You'd then have something such as:

Person(1,John)
Hospital(800,"Bart's London",1234)
LinkTable(1000,1,800)

You'd then be able to find all of the distinct hospital codes by doing 
select distinct code from hospital.

Apologies if this isn't possible.

Gary
Thread
Render row without duplicatesbharani kumar2 Jan
  • Re: Render row without duplicatesBenedikt Schackenberg2 Jan
    • Re: Render row without duplicatesGary Smith2 Jan
  • Re: Render row without duplicatesGary Smith2 Jan
  • Re: Render row without duplicatesJim Lyons2 Jan
    • Re: Render row without duplicatesbharani kumar2 Jan
      • Re: Render row without duplicatesbharani kumar3 Jan
        • Re: Render row without duplicatesJim Lyons3 Jan
          • Re: Render row without duplicatesbharani kumar15 Jan