4
Answers

How to get Top 1 with below statement

Ramco Ramco

Ramco Ramco

1y
510
1

Hi

  In below statement i want to get Top 1 record

CASE
    WHEN (
        SELECT COUNT(*)
        FROM SessionDeliveryParticipant AS sub
        WHERE sub.[SessionDeliveryCalendarID] = [SessionDeliveryCalendarID]
        AND sub.PresentInSession = 0
    ) = COUNT(*) THEN 1
    ELSE 0 End

Thanks

Answers (4)