Home Forums SQL Server 2008 T-SQL (SS2K8) pulling records from a table between date ranges in another table RE: pulling records from a table between date ranges in another table

  • I can't add the column b/c I need to query all records between the 1st and 2nd date of the lookup table and add the column 30 to it to represent that these records happened during the first 30 days.

    Then I need to get a 2nd set of records between the 2nd and 3rd dates and tag a column that has 60 meaning that those records were created in the last 60 days

    etc. But, they need to be all in record set.

    If I didn't need the look up table to dictate the 30 days, that would fabulous and I could just update each row based on a beginning date and calculate whether it's in a 30 day range, 60 day range or 90 day range of a start date