Query Help

Query Help

 

  



Dear All
can i use the count function in this query

SELECT
A.COM_NAME,B.ContractName,B.ContractCode,B.EXT_Employees,B.K_EMPLOYEES,B.F_EMPLOYEES,B.T_EMPLOYEES,
cast((cast(b.K_Employees as float) / cast((F_Employees+K_EMPLOYEES)
as float))*100 as char)+'%'
as "Employees Percentage"
FROM K_COMPANIES A
INNER JOIN Contracts B ON A.K_ID=B.K_ID

i need to count the number of Percentage, but i'm having problem using it
with thethe case function
For example i need to count
cast((cast(b.K_Employees as float) / cast((F_Employees+K_EMPLOYEES)
as float))*100 as char)+'%'
as "Employees Percentage"

Kind Regards




MS Sql Server LazyDBA home page