/* 企 貉殊 レ煙 伎. - IP - DB - Schema - 企 - 貉 - ETL Rule */ EXEC sys.sp_addextendedproperty @name = N'IP' , @value = N'192.168.0.1' , @level0type = N'SCHEMA' , @level0name = N'Common' , @level1type = N'TABLE' , @level1name = N'企覈' , @level2type = N'COLUMN' , @level2name = N'貉朱' GO SELECT 'EXEC sys.sp_addextendedproperty ' + CASE WHEN B.Seq = 1 THEN 'N''1. Source IP'', '''', ' WHEN B.Seq = 2 THEN 'N''2. Source DB'', '''', ' WHEN B.Seq = 3 THEN 'N''3. Source Schema'', '''', ' WHEN B.Seq = 4 THEN 'N''4. Source Table'', '''', ' WHEN B.Seq = 5 THEN 'N''5. Source Column'', '''', ' WHEN B.Seq = 6 THEN 'N''6. ETL Rule'', '''', ' END + 'N''SCHEMA'', N''' + TABLE_SCHEMA + ''', ' + 'N''TABLE'', N''' + TABLE_NAME + ''', ' + 'N''COLUMN'', N''' + COLUMN_NAME + '''' FROM INFORMATION_SCHEMA.COLUMNS CROSS JOIN ( SELECT 1 Seq UNION ALL SELECT 2 Seq UNION ALL SELECT 3 Seq UNION ALL SELECT 4 Seq UNION ALL SELECT 5 Seq UNION ALL SELECT 6 Seq) B --WHERE TABLE_NAME = '企覈'