ALTER VIEW [dbo].[QPEGITIMD]
AS
SELECT     PEGITIM.TARIH, PEGITIM.SAAT, TSAGLIKP.SPAD, TSAGLIKP.SPSOYAD, PEGITIM.KONU, TBIRIM.BIRIMADI, TSAGLIKP.SPSICILNO, TSAGLIKP.SPID, PEGITIM.YER, PEGITIMD.EGITIMID, 
                      PEGITIMD.EGITIMDID
FROM         PEGITIMD INNER JOIN
                      PEGITIM ON PEGITIMD.EGITIMID = PEGITIM.EGITIMID INNER JOIN
                      TSAGLIKP ON PEGITIMD.SPID = TSAGLIKP.SPID LEFT OUTER JOIN
                      TBIRIM ON TBIRIM.BIRIMID = TSAGLIKP.BIRIMID