• Well in your a DateKey dimenstion table you should have columns like below.

    copied this from adventureworksdw

    CREATE TABLE [dbo].[DimTime](

    [TimeKey] [int] IDENTITY(1,1) NOT NULL,

    [FullDateAlternateKey] [datetime] NULL,

    [DayNumberOfWeek] [tinyint] NULL,

    [EnglishDayNameOfWeek] [nvarchar](10) NULL,

    [SpanishDayNameOfWeek] [nvarchar](10) NULL,

    [FrenchDayNameOfWeek] [nvarchar](10) NULL,

    [DayNumberOfMonth] [tinyint] NULL,

    [DayNumberOfYear] [smallint] NULL,

    [WeekNumberOfYear] [tinyint] NULL,

    [EnglishMonthName] [nvarchar](10) NULL,

    [SpanishMonthName] [nvarchar](10) NULL,

    [FrenchMonthName] [nvarchar](10) NULL,

    [MonthNumberOfYear] [tinyint] NULL,

    [CalendarQuarter] [tinyint] NULL,

    [CalendarYear] [char](4) NULL,

    [CalendarSemester] [tinyint] NULL,

    [FiscalQuarter] [tinyint] NULL,

    [FiscalYear] [char](4) NULL,

    [FiscalSemester] [tinyint] NULL,

    CONSTRAINT [PK_DimTime_TimeKey] PRIMARY KEY CLUSTERED

    (

    [TimeKey] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],

    CONSTRAINT [AK_DimTime_FullDateAlternateKey] UNIQUE NONCLUSTERED

    (

    [FullDateAlternateKey] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING ON

    GO

    AND your query would looke like this.

    SELECT [dbo].[FactMaterialDelivery].[MaterialDeliveryRowInfoKey],

    [dbo].[FactMaterialDelivery].[ActualIssueDateKey],

    [dbo].[FactMaterialDelivery].[Bill-toCustomerKey],

    [dbo].[FactMaterialDelivery].[IssueDateKey],

    [dbo].[FactMaterialDelivery].[MaterialKey],

    [dbo].[FactMaterialDelivery].[PayerCustomerKey],

    [dbo].[FactMaterialDelivery].[StoreKey],

    [dbo].[FactMaterialDelivery].[Ship-toCustomerKey],

    [dbo].[FactMaterialDelivery].[Sold-toCustomerKey],

    [dbo].[FactMaterialDelivery].[VendorKey],

    [dbo].[FactMaterialDelivery].[Actual Quantity Delivered Stock Units],

    [dbo].[FactMaterialDelivery].[Actual Quantity Delivered Sales Units],

    [dbo].[FactMaterialDelivery].[Gross weight],

    [dbo].[FactMaterialDelivery].[Net weight],

    [dbo].[FactMaterialDelivery].[Number of Delivery Items],

    [dbo].[FactMaterialDelivery].[Volume delivered],

    [dbo].[FactMaterialDelivery].[MaterialPlantAttributeKey],

    [dbo].[FactMaterialDelivery].[Delivered Qty BUn]

    FROM [dbo].[FactMaterialDelivery]

    INNER JOIN [dbo].[DimTime] dt

    ON [TimeKey] = IssueDateKey

    WHERE dt.[MonthNumberOfYear] = 6

    AND [CalendarYear] = 2012