• In that case, you need an insert statement, not an update.

    Insert puts new rows into a table, update modifies existing rows in the table.

    Insert into dbo.MetaEvents (MetaFYStamp, MetaPerStamp, MetaDateStamp)

    select cast([Fiscal Year] as varchar(4)),

    cast([Fiscal Period] as varchar(2)),

    cast([Date YYYYMMDD] as varchar(8))

    from dim_calendar

    where dim_calendar.[date] = (select max([invoice date]) from dbo.customer_salesanalysis) and (dim_calendar.division = '')

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass