Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to speed up this query?
Message
 
À
08/08/2012 11:49:29
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01550135
Message ID:
01550152
Vues:
39
>>>>
		AND  ??????????.sob_effective = (select Max(sob_effective) 
>>>>							from ScheduleOfBenefits t2 
>>>>							where t2.sob_benfk = t1.sob_benfk 
>>>>						          and t2.sob_codfk = t1.sob_codfk
>>>>							  and t2.sob_effective <= '20120801') Tbl1
>>>>
>>>>       ON [BenefitCodes].Ben_pk = Tbl1.sob_benfk
>
>OK, I saw the other changes you made.
>
>I am getting a syntax error: "Incorrect syntax near Tbl1" and the red squiggly underline near the first occurrence of Tbl1 in the section I quoted above.
>
>I am not familiar enough with this syntax to see what is wrong here, do you?

Must have one more bracket before Tbl1:
)) Tbl1
ON ...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform