lejo

lejo

  • 1.3k
  • 424
  • 14.2k

How to check this in single statement

Dec 29 2022 7:48 AM

How to check this in single statement ,if both condition satisfied then return true other wise false

case when (select COUNT(*) from NSP113_PayrollStatus_Divisionwise where  PayrollStageId='DC811F70-B1D5-4910-8FCF-E6C83DD8FABB' and Status=1 
and PayrollMonthid = (select NSP112PRP_ID from nsp112_payroll_period where NSP112PRP_Active_YN=1 ))>0 then 'True' else 'False' end as 'Initiated',

case when (select COUNT(*) from NSP113_PayrollStatus_Divisionwise where  PayrollStageId='AA0B84E4-70C8-4E33-BD6E-C9F30B996D9D' and Status=0 
and PayrollMonthid = (select NSP112PRP_ID from nsp112_payroll_period where NSP112PRP_Active_YN=1 ))>0 then 'True' else 'False' end as 'Submit'

Answers (1)