Thursday, September 1, 2022

when condition with where clause SQL, CASE When under CASE When condition

 where Training_Partner_id='ESDM-HR-TP-000379' AND Total_Certified > 0

AND Total_Placed >=( CASE WHEN (Batch_Start_date ='01/04/2022')

THEN

                                 (CASE WHEN max_student_allowed % 2 = 0 

                            THEN ((max_student_allowed/2))

                                ELSE ((max_student_allowed/2)+1)

                            END )

ELSE

(0)

END)

No comments:

Post a Comment