You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
4.6 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

USE [TIM]
GO
/****** Object: View [dbo].[View_RPT_ThemaKommunikation] Script Date: 12.05.2013 10:10:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[View_RPT_ThemaKommunikation]
AS
SELECT dbo.Thema.Titel AS Thema, dbo.Kommunikation.Bezeichnung AS Kommunikation, dbo.Kommunikation.erstellt_am AS [Kommuikation erstellt_am],
dbo.KommunkationAuspraegung.Bezeichnung AS Auspraegung, dbo.Zielgruppe.Bezeichnung AS Zielgruppe
FROM dbo.Kommunikation INNER JOIN
dbo.KommunkationAuspraegung ON dbo.Kommunikation.KommunikationNr = dbo.KommunkationAuspraegung.KommunikationNr INNER JOIN
dbo.Thema ON dbo.Kommunikation.ThemaNr = dbo.Thema.ThemanNr LEFT OUTER JOIN
dbo.KommunikationAuspraegung_Zielgruppe ON
dbo.KommunkationAuspraegung.KommunikationAuspraegungNr = dbo.KommunikationAuspraegung_Zielgruppe.Kommunikationauspraegungnr LEFT OUTER JOIN
dbo.Zielgruppe ON dbo.KommunikationAuspraegung_Zielgruppe.Zielgruppenr = dbo.Zielgruppe.ZielgruppeNr
GO
/****** Object: View [dbo].[View_RPT_Themenuebersicht] Script Date: 12.05.2013 10:10:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[View_RPT_Themenuebersicht]
AS
SELECT dbo.Thema.Titel, dbo.Thema.Beschreibung, dbo.Kategorie.Bezeichnung, dbo.Thema.Suchbegriffe, CASE WHEN dbo.Thema.Gueltig_ab < '01.01.1910' THEN NULL
ELSE dbo.thema.gueltig_ab END AS Guelitg_ab, CASE WHEN dbo.Thema.Gueltig_bis < '01.01.1910' THEN NULL ELSE dbo.thema.gueltig_bis END AS Gueltig_bis,
dbo.Kategorie.mutiert_am, dbo.Thema.erstellt_am
FROM dbo.Thema INNER JOIN
dbo.Kategorie ON dbo.Thema.KategorieNr = dbo.Kategorie.KategorieNr
WHERE (dbo.Thema.aktiv = 1)
GROUP BY dbo.Thema.Titel, dbo.Thema.Beschreibung, dbo.Kategorie.Bezeichnung, dbo.Thema.Suchbegriffe, dbo.Kategorie.mutiert_am,
CASE WHEN dbo.Thema.Gueltig_ab < '01.01.1910' THEN NULL ELSE dbo.thema.gueltig_ab END, CASE WHEN dbo.Thema.Gueltig_bis < '01.01.1910' THEN NULL
ELSE dbo.thema.gueltig_bis END, dbo.Thema.erstellt_am
GO