geekette33
Technical User
Hi,
I have a user table in SQL that stores all users along with information like username, department, team, job title etc... If a user makes an update to their information a new record is created (therefore a user can have more than one record). When the new record is created the previous record is given an end date and active flag is set to 1.
When i run reporting linking this table to other data I need to also have a start date for each record so that I can link the relavant details to the data. E.g if the linked data is pulling a users call volumes in January I want to show the team they worked in in January.
The problem is I don't have the rights to change the original table (it was set up by someone else) So think I may need to first create a temporary table, add an additional column (Start Date), run a query that sorts the records by user, then by record end date and then work out the start date for each record (will always be +1 from the previous end date). Any help or guidance would be so appreciated as I've no idea how to approach
I have a user table in SQL that stores all users along with information like username, department, team, job title etc... If a user makes an update to their information a new record is created (therefore a user can have more than one record). When the new record is created the previous record is given an end date and active flag is set to 1.
When i run reporting linking this table to other data I need to also have a start date for each record so that I can link the relavant details to the data. E.g if the linked data is pulling a users call volumes in January I want to show the team they worked in in January.
The problem is I don't have the rights to change the original table (it was set up by someone else) So think I may need to first create a temporary table, add an additional column (Start Date), run a query that sorts the records by user, then by record end date and then work out the start date for each record (will always be +1 from the previous end date). Any help or guidance would be so appreciated as I've no idea how to approach
