Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Join
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00669751
Message ID:
00669854
Vues:
17
Why not try the query in two parts. Do the first 2 inner joins and then union it to the third.

FROM holding thold
inner join security
on thold.securityid = security.securityid
inner join portfolio
on thold.portid = portfolio.portid
WHERE thold.date = @asofdate
union ( select ... from holding
left join holding yhold
on (thold.portid = yhold.portid and thold.securityid = yold.securityid
WHERE yhold.date = @prevdate)
into ...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform