My thread's title's quite confusing so I'll try to elaborate. I have the following data set
[TABLE="width: 888"]
<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]effective_date[/TD]
[TD]UNIQUE_ID[/TD]
[TD]emp_id[/TD]
[TD]full_name[/TD]
[TD]length_of_service[/TD]
[TD]Status[/TD]
[TD]emp_business_title[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.13[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.38[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.63[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]4.82[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]5.07[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]5.32[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]4.65[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]4.9[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]5.15[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]706560Giselle Peck[/TD]
[TD="align: right"]706560[/TD]
[TD]Giselle Peck[/TD]
[TD="align: right"]2.14[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.4[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.65[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.9[/TD]
[TD][/TD]
[TD]SMB Strategic Account Executive[/TD]
[/TR]
</tbody>[/TABLE]
and I want to create a flag that would indicate whether employee's business title has been amended over the years<body id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 888"]
<tbody>[TR]
[TD]emp_business_title[/TD]
[/TR]
</tbody>[/TABLE]
</body>; that would suggest a promotion for example. So, in the sample pasted I'd like to create a new column where the red highlighted entries would have a flag i.e."Title Changed" or whatever.
The reason why there are multiple entries of the same employee is because there is a quarter effective date which takes a snapshot of the employees count, status etc.
Any thoughts?
[TABLE="width: 888"]
<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]effective_date[/TD]
[TD]UNIQUE_ID[/TD]
[TD]emp_id[/TD]
[TD]full_name[/TD]
[TD]length_of_service[/TD]
[TD]Status[/TD]
[TD]emp_business_title[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.13[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.38[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]704287Sina Mirzad[/TD]
[TD="align: right"]704287[/TD]
[TD]Sina Mirzad[/TD]
[TD="align: right"]5.63[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]4.82[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]5.07[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]705704Lauryn Coit[/TD]
[TD="align: right"]705704[/TD]
[TD]Lauryn Coit[/TD]
[TD="align: right"]5.32[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]4.65[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]4.9[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]706291Baldev Singh[/TD]
[TD="align: right"]706291[/TD]
[TD]Baldev Singh[/TD]
[TD="align: right"]5.15[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]706560Giselle Peck[/TD]
[TD="align: right"]706560[/TD]
[TD]Giselle Peck[/TD]
[TD="align: right"]2.14[/TD]
[TD][/TD]
[TD]Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]30-04-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.4[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-07-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.65[/TD]
[TD][/TD]
[TD]Senior Account Executive (SMB)[/TD]
[/TR]
[TR]
[TD="align: right"]31-10-16[/TD]
[TD]707098Jayann Raguini[/TD]
[TD="align: right"]707098[/TD]
[TD]Jayann Raguini[/TD]
[TD="align: right"]4.9[/TD]
[TD][/TD]
[TD]SMB Strategic Account Executive[/TD]
[/TR]
</tbody>[/TABLE]
and I want to create a flag that would indicate whether employee's business title has been amended over the years<body id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 888"]
<tbody>[TR]
[TD]emp_business_title[/TD]
[/TR]
</tbody>[/TABLE]
</body>; that would suggest a promotion for example. So, in the sample pasted I'd like to create a new column where the red highlighted entries would have a flag i.e."Title Changed" or whatever.
The reason why there are multiple entries of the same employee is because there is a quarter effective date which takes a snapshot of the employees count, status etc.
Any thoughts?