Einträge von AZConAdmin

Select Value List

SELECT a FROM  (VALUES  (‘D_Kostenart’), (‘D_Produkt’), (‘F_A_AuftragsKostenumsatzSAP’), (‘F_Bestelloptionen’), (‘F_Lieferzeiten’), (‘F_Personalzeiten’), (‘separate Auswertungen’), (‘Staging_Casymir’), (‘Staging_ContentStore’), (‘Staging_DHM_Rogler’), (‘Staging_ExcelCSV’), (‘Staging_ExcelCSV_CostCenter’), (‘Staging_ExcelCSV_Operations’), (‘Staging_GA’), (‘Staging_product_times_2_client_complete’), (‘Staging_ShopDB’), (‘Staging_ShopDB_DeleteInkrementel’), (‘v_DWH’), (‘v_Kundenexporte’), (‘y_Cognos_Audit_DWH’), (‘y_DWHExport_AuftraegeProduktion’), (‘y_DWHExpSales_CRM’), (‘y_DWHExpSalesgruppe_CRM’), (‘y_ExportSelligent’), (‘Z_DWH_Gesamt_KoRe’), (‘Z_DWH_Gesamt_MaWi’), (‘Z_DWH_Gesamt_Prod’), (‘Z_DWH_Gesamt_Sales’), (‘Z_DWH_Gesamt_SalesGruppe’)   ) AS MyTable(a)

recreate D_Datum

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET LANGUAGE ‘German’ GO   SET DATEFIRST 1 GO   IF EXISTS(     SELECT * FROM sys.objects     WHERE name = ‘D_Datum’) DROP TABLE D_Datum GO   CREATE TABLE D_Datum( [Datum] date NOT NULL PRIMARY KEY, [Jahr (#)] int NOT NULL, [Quartal (#)] tinyint NOT […]

Azure SQL DB – SQL User verwalten / anlegen

jeweils einzeln ausführen. use master CREATE LOGIN ETLWrite WITH PASSWORD=’lpsigl31!#A!a’; GO use master CREATE  USER ETLWrite FROM LOGIN ETLWrite GO use Datawarehouse CREATE  USER ETLWrite FROM LOGIN ETLWrite GO   use Datawarehouse exec sp_addrolemember ‘db_owner’, ‘ETLWrite’;

Abfrage für Sortierung einer Datenbank nach Tabellengröße

SELECT      t.name AS TableName,     s.name AS SchemaName,     p.rows,     SUM(a.total_pages) * 8 AS TotalSpaceKB,      CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,     SUM(a.used_pages) * 8 AS UsedSpaceKB,      CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,      (SUM(a.total_pages) – SUM(a.used_pages)) * 8 AS UnusedSpaceKB,     CAST(ROUND(((SUM(a.total_pages) – SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB FROM      sys.tables t INNER JOIN           sys.indexes i ON t.object_id = i.object_id INNER JOIN      sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id INNER JOIN      sys.allocation_units a ON p.partition_id = a.container_id LEFT OUTER JOIN      sys.schemas s ON t.schema_id = s.schema_id WHERE      t.name NOT LIKE ‘dt%’      AND t.is_ms_shipped = 0     AND i.object_id > 255  GROUP BY      t.name, s.name, p.rows ORDER BY      TotalSpaceMB DESC, t.name

SQL Abfragen auf Cognos ContentStore

Abfrage nach Berichtseigentümer: SELECT    o.cmid AS Berichtsid,   Names.NAME AS Berichtsname,   n2.REFCMID AS EigentümerID,   Pr33.NAME AS Eigentümername,   Pr33.USERID AS EigentümerKennung   FROM   [Cognos_CS_CMOBJECTS] o   LEFT JOIN [Cognos_CS_CMREFNOORD2] n2 on o.cmid= n2.CMID   LEFT JOIN [Cognos_CS_CMOBJPROPS33] Pr33 on n2.REFCMID=Pr33.CMID   LEFT JOIN [Cognos_CS_CMOBJNAMES] Names on o.CMID = Names.CMID   where […]

Schema.ini Varianten

[DownloadcodesEinloesung.txt] Format=Delimited(;) CharacterSet=ANSI ColNameHeader = true TextDelimiter=none   ——————— [adcellexport.txt] Format=Delimited(,) DecimalSymbol=. CharacterSet=ANSI ColNameHeader = true   Col1 = Datum Text Col2 = Bearbeitungsdatum Text Col3 = Status Text Col4 = “automatische Freigabe” Text Col5 = ProgrammId DOUBLE Col6 = Programm Text Col7 = WerbemittelId DOUBLE Col8 = Referenz DOUBLE Col9 = Referer Text Col10 […]