Hi guys, I am trying to do have the following functions in a view
-2.49416 + AGE + max(FTPSA - 0.065867907, 0)**3 - 355.52143
I have the following but it generates an error, any ideas?
CREATE VIEW dbo.Calc
AS
select LoginName,( ResultAny) As Prob
from
(select LoginName,
(-2.49416 + AGE + power(max(PSA - 3.247),3 )- 355.52143 )
AS ResultAny
from
(
SELECT LoginName, AGE,EB,IPSS,PSA,FTPSA, ptFH =
CASE
WHEN FH='Y' THEN 1
WHEN FH ='N' THEN 0
END,
'ptdre' =
CASE
WHEN DRE = 'Y' THEN 1
WHEN DRE = 'N' THEN 0
END
FROM dbo.Probability)
Calc)Calc
Thanks in advance,
Greta
-2.49416 + AGE + max(FTPSA - 0.065867907, 0)**3 - 355.52143
I have the following but it generates an error, any ideas?
CREATE VIEW dbo.Calc
AS
select LoginName,( ResultAny) As Prob
from
(select LoginName,
(-2.49416 + AGE + power(max(PSA - 3.247),3 )- 355.52143 )
AS ResultAny
from
(
SELECT LoginName, AGE,EB,IPSS,PSA,FTPSA, ptFH =
CASE
WHEN FH='Y' THEN 1
WHEN FH ='N' THEN 0
END,
'ptdre' =
CASE
WHEN DRE = 'Y' THEN 1
WHEN DRE = 'N' THEN 0
END
FROM dbo.Probability)
Calc)Calc
Thanks in advance,
Greta