I have a string variable in vba containing the following SQL : -
"SELECT Count(*) AS employ_number, table1.job AS jobs " & _
"FROM (SELECT DISTINCT names, job FROM table1) AS countx " & _
"GROUP BY table1.job "
that's worked fine
from the above , I have a grouped counts based on job in table1, for ex :
engineer = 15
captain = 20
lawyer =13
I need to do a subtraction from each job according to a number specified by a control ,
so if these controls (eng = 2 , capt = 3 , law = 7)
then the result should be :
engineer = 13
captain = 17
lawyer = 6
any ideas ?
"SELECT Count(*) AS employ_number, table1.job AS jobs " & _
"FROM (SELECT DISTINCT names, job FROM table1) AS countx " & _
"GROUP BY table1.job "
that's worked fine
from the above , I have a grouped counts based on job in table1, for ex :
engineer = 15
captain = 20
lawyer =13
I need to do a subtraction from each job according to a number specified by a control ,
so if these controls (eng = 2 , capt = 3 , law = 7)
then the result should be :
engineer = 13
captain = 17
lawyer = 6
any ideas ?
Last edited: