Need Help

  • I am trying to write a DTS that will create a new table that as the diffent values.

    example (My Table as a list of sales and Fiscal Years I want to create a new table that has the list of the different years that are in the sales table.)

    is there an easy way to do. insead of having to look record by record and check to see if the value of year is not equal to a value that I have in the new table i created.

  • This was removed by the editor as SPAM

  • Not sure if I follow completely.  How about some sample data from your source and some data for the desired outcome (target).

  • Are you looking to total some value(Sales) by year?  You may want to consider using something like:

    Select Total(Sales) Group By Year(SalesDate)

    For example:

    SELECT PaidDate, sum(AmountPaid) FROM Payments Group By PaidDate order by PaidDate

    Then take that result and Insert it into a table.  I prefer to calculate these things and keep them dynamic rather that creating a table that has to be refreshed.  If that's the case the I would use then the 'Execute SQL Task' of DTS and some variation of the code above to load the data. 

    HTH

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply