TrendMaster: EmployeeID, Joined_Period, Delay, Index, Branch
*Joined_period takes month eg: "April", "March"...
TrendSheet: Branch, April_Joined, April_Delay, April_Index, May_Joined...so on till March_Delay, March_Index
I need to update April_Joined with: Count of employees in TrendMaster for whome Joined_period is April and these need to be grouped as TrendMaster.Branch=TrendSheet.Branch
The query that i thought should work is:
Expand|Select|Wrap|Line Numbers
- UPDATE TrendSheet INNER JOIN TrendMaster ON TrendSheet.Branch = TrendMaster.Branch
- SET TrendSheet.April_Joined = ( Select Count(*) from TrendMaster where TrendMaster.Joined_Period='April')
Please suggest!