Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not Exists
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01219446
Message ID:
01219495
Vues:
8
I'm sorry for the confusion.

If I tell you that instead of id being id it is Team Name
and AssemblyID is Sport Name and PartsId is PeopleName.

So now parent one table is the table that holds the Sports that A team plays
and parent two becomes the players on A Team. The Combined table is the list of players on a team that plan to participate in Events at a competition.
Event Table
TeamName     Sport       Person
  A           Golf         John
  A           Golf         Mary
  A           Golf         Jim
  B           Golf         Dick
  B           PingPong     Dick
  B           PingPong     Jane
  C           Golf         Joe
  C           PingPong     Bob
  D           Golf         Tom
  D           Golf         Trudy

Sports
TeamName    Sport
  A          Golf
  B          Golf
  B          PingPong
  C          Golf
  C          PingPong
  D          Golf

People
Team      Person
 A          John
 A          Mary
 A          Jim
 B          Dick
 B          Jane
 C          Joe
 C          Bob
 D          Tom
In this case between the time the teams sign up for an event and now Trudy is no longer on team D. So I want Trudy the event and the team returned.

I think I've got it fixed now. Seems to be working, need some more testing.

Thanks anyway.

Jeff


>>
>>
>>Desired result
>>id AssemblyID PartsId
>>4 1 2
>>


>>Ok,
>>
>>
>>combined
>>id     AssemblyID       PartsId
>>1           1               1
>>1           1               2
>>1           1               3
>>2           1               1
>>2           2               1
>>2           2               2
>>3           1               1
>>3           2               1
>>4           1               1
>>4           1               2
>>
>>ParentOne
>>id      AssemblyID
>>1          1
>>2          1
>>2          2
>>3          1
>>3          2
>>4          1
>>
>>
>>ParentTwo
>>id      PartsId
>>1          1
>>1          2
>>1          3
>>2          1
>>2          2
>>3          1
>>3          2
>>4          1
>>
>>
>>Desired result
>>id      AssemblyID       PartsId
>>4           1               2
>>
>>Parent may have been a bad choice of words.
>>
>>TIA
>>Jeff
>
>Jeff,
>I am still confused, why only
>
>id      AssemblyID       PartsId
>4           1               2
>
>in the Combined table you have
>
>id      AssemblyID       PartsId
>1           1               2
>
>Why not include it in the result?
>As far as I understand your combined table keeps AssemblyID of the ParentOne in AssemblyId field and PartsId of the ParentTwo in PartsId and you want the records which have no match in BOTH parent tables, is this right?

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform