SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE   VIEW [transform_config].[Auftragsart] AS
--Auftragsart
SELECT [Client_DB]
     , [Code] AS [Gen_ Prod_ Posting Group]
     , [Description]
     , CASE
           WHEN [Description] LIKE '%mech%' THEN 'Mech.'
           WHEN [Description] LIKE '%karo%' THEN 'Karo.'
           WHEN [Description] LIKE '%lack%' THEN 'Lack'
           WHEN [Description] LIKE '%lohn%' THEN 'Mech.'
           WHEN [Description] LIKE '%artikel%' THEN 'Teile'
           WHEN [Description] LIKE '%fremdl%' THEN 'Fremdl.'
           WHEN [Description] LIKE '%leih%' THEN 'Mietw.'
           WHEN [Description] LIKE '%miet%' THEN 'Mietw.'
           WHEN [Description] LIKE '%sonst%' THEN NULL
           WHEN [Description] LIKE '%teile%' THEN 'Teile'
    END AS [Zuordnung]
FROM GC_TRANSIT_ARI.[import].[Gen_Prod_Posting_Group]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
