SQL Update using JOIN

DECLARE @SampleDataTable TABLE (    ID INT IDENTITY(1,1) PRIMARY KEY,    Date SMALLDATETIME,     EndDate SMALLDATETIME)INSERT INTO @SampleDataTable     SELECT '2011-03-01', NULL    UNION ALL    SELECT '2011-03-02', NULL    UNION ALL    SELECT '2011-03-03', NULL    UNION ALL    SELECT '2011-03-04', NULL    UNION ALL    SELECT '2011-03-05', NULL    SELECT * FROM @SampleDataTable

Leave a Reply

Your email address will not be published. Required fields are marked *