In a Data Mart I have a table with information about Players (Dimension Player). And It have the following attributes: • Name (nvarchar(250))• Dt_Contract (date)• New_Player (int)• DT_Execution (datetime) The New_Player is a “binary code” and it show us the new team players. It is calculated as follows:• MONTH(DT_Contract) = MONTH(CAST(@DT_Execution AS DATE)) THEN 1 ELSE 0 ENDSo,1 – Is a new player0 – Is a old playerThe Dt_Execution is the Date on which the process runs---------------------------------------------------------------------------------------------------------------------------------I liked to be able to see what new players on a specific date e not only when Month(DT_Conttract) = Month(Dt_Execution)Basically, Players who have been entered today are with the correct value in New_Player but if I want to observe what were the new players last month I will not be able to watch what they were. I think I need something more dynamic paw achieve this flexibility.Does anyone have any idea how can I get it? What type of modification I have to implement in the table?PS: The code is inserted SP that runs every day.
↧