Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>I have two tables linked by an id# (and a few other fields)
>>>
>>>I want to keep the first table exactly as it is (that is to say, with out adding records) but add the fields from the second table to the end of the first table.
>>>
>>>If there is no match, blank fields are fine. If there are multiple matches, I just want the first one. NO ADDING RECORDS ALLOWED! How do I do that? I tried a left join, but got back too many records.
>>>
>>>I want all the parent records, no more, no less.
>>>
>>>Thanks!
>>
>>Use the groupby for the linking id.
>>
>>HTH
>
>Yech. Is that the best I can do. Darn I was hoping I just was missing something when it came to the join syntax. Ok, ok... I'll group by the key fields. Thanks for your help Dan! You are the ... I bet you get that all the time, I won't go there :-)
I never get it. I make too many mistakes. And there actually could be a better solution out there, but its the only one I can think of.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement