Re: Count of related records - Grid
Ok, that was a typo but certainly true in a way - the advice given was not exactly what I needed BUT it did allow me to figure it out. The typical thought process of mine, reverse two words and it changes the meaning entirely it should have read "I could have NEVER.."
Probably why it takes me so many attempts to work things out in my head, lol.
I also have to hand some credit to AA with the ability to convert SQL expressions to the different databases. Although in MySQL Workbench, I couldn't just put the sql expression because I have to write it a bit different - but again, the idea is what gets you there sometimes not the actual word for word advice.
For instance to create the final view this is what is looked like in MySQL Workbench a query tab.
As you can see this view was based on the previous view and the jqcalendar table (which by the way refers to Jim Coltz calendar table). It was tough to figure out what was as I said the "proper" syntax to get it done.
~Cheers all, and thank you for the advice.
Ok, that was a typo but certainly true in a way - the advice given was not exactly what I needed BUT it did allow me to figure it out. The typical thought process of mine, reverse two words and it changes the meaning entirely it should have read "I could have NEVER.."
Probably why it takes me so many attempts to work things out in my head, lol.
I also have to hand some credit to AA with the ability to convert SQL expressions to the different databases. Although in MySQL Workbench, I couldn't just put the sql expression because I have to write it a bit different - but again, the idea is what gets you there sometimes not the actual word for word advice.
For instance to create the final view this is what is looked like in MySQL Workbench a query tab.
Code:
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `activejob_count` AS select `my_view`.`Job` AS `Job`, count(`my_view`.`Job`) AS `ActiveCount`, `jqcalendar`.`company_id` AS `company`, min(`my_view`.`TaskDate`) AS `Next` from (`my_view` join `jqcalendar` ON ((`jqcalendar`.`Id` = `my_view`.`Job`))) where (`jqcalendar`.`Job_IsActive` = 'Yes') group by `my_view`.`Job`
~Cheers all, and thank you for the advice.
Comment