且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在sql中的下面代码中编写select查询。

更新时间:2022-11-27 15:25:29

此查询仅正确



this query is correct only

Sqlstr = "select sum(sal_bonus) as bonusamt from salary_master where sal_deleted = 0 "+
         " and year(sal_bonusdate) = " + lngPreviousYear + " and comp_id = " + strCompanyid +
        " and emp_code = '" + Txt_Employee.Text+ "'" ;
       if (vpcn.gbHalfSalary == true)
       {
           Sqlstr += " and sal_type = '" + vpcn.cSalary_2Half + "' ";
       }
       strBonus = cfs.get_data(Sqlstr);





为什么要重新提交你的问题

你想在这里告诉我们什么



why r u reposting your question
what do you want here tell us clearly