Aug 1, 2011

Cross Apply Sample

sELECT distinct a.Loc_Icardallotter, LEFT(el.EmpList,LEN(el.EmpList)-1)
FROM Mlocationwisealloter a
cross apply ( select loc_fullname +' , ' as [text()]
from Mlocationwisealloter b inner join mlocation on loc_code = b.loc_unitcd where b.loc_moduleno = a.loc_moduleno and b.Loc_Icardallotter = a.Loc_Icardallotter
order by loc_fullname
FOR XML PATH(''))el (EmpList)
WHERE (Loc_moduleno = 270)

No comments:

Post a Comment

What is the use of n-tier architecture and 3-tier architecture?

how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...