Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help to build a Query
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01357186
Message ID:
01357192
Vues:
17
If we need this to list for all people I see no other way than make this a table-valued function and use it like this
select * from Names  CROSS APPLY dbo.ufn_MissingModules(Names.ID) MM

create function ufn_MissingModules(@PersonID int) RETURNS table
AS RETURN
SELECT Modulos
 	FROM Modulos 
 		LEFT JOIN ModAsg ON Modulos.Cod = ModAsg.CodModule AND ModAsg.IDusuario = @PersonID
 	WHERE ModAsg.CodModule IS NULL	
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform