Home Forums SQL Server 2008 T-SQL (SS2K8) SQL Server Table Structure, StartDate and EndDate RE: SQL Server Table Structure, StartDate and EndDate

  • due to the Conflict of ideas, I just notice that I need the endDate to be used for removed destination or prefix

    Example:

    INSERT INTO @Tariffs(Tariff_id,Prefix,destination_name,rate,startdate)

    SELECT '127','3360042','France-Bouygues Mobile','0.15','2010-05-22' UNION ALL

    --Rate changes

    SELECT '127','3360042','France-Bouygues Mobile','0.14','2010-05-27' UNION ALL

    --Code changes (3360042 removed and must be ended by using update statement)

    SELECT '127','336004','France-Bouygues Mobile','0.14','2010-06-04' UNION ALL

    --Destination name changes (France-Bouygues Mobile removed and must be ended by using update statement)

    SELECT '127','336004','France-Mobile','0.17','2010-06-18'