具有ISNULL和计算的HIbernate标准

时间:2017-12-06 09:34:52

标签: spring hibernate

我在下面有这个查询。刚开始学习标准。有人可以帮助我将其转换为标准查询。

class SecurityController extends Controller
{
    /**
     * @Route("/auth", name="auth")
     */
    public function loginAction(Request $request)
    {
        //Here is the code, If I comment It nothing changes and I don't use here any MedicalStaff object
    }

}

如果没有isnull部分,我已经完成了如下所示的标准。

SELECT 
    AVAILABILITY, QUALITY, 
    (ISNULL(Act1,0) + ISNULL(Act2,0) + ISNULL(Act3,0)) 
as 'OK',
    (ISNULL(Act1,0) + ISNULL(Act2,0) + ISNULL(Act3,0)) - 
    (ISNULL(PSN,0) + ISNULL(MSN,0) + ISNULL(PPN,0) + ISNULL(MPN,0))  
 as 'Total'
 FROM ODATA where L_Code='lcode' and S_Code='scode'

0 个答案:

没有答案