Sunday, August 14, 2022

Use Case in SQL

 select @OfficeCode=OfficeCode   from Office where OfficeID= @OfficeID


SELECT OfficeId FROM Office

WHERE (CASE WHEN @OfficeLevel=1 THEN FirstLevel

WHEN @OfficeLevel=2 THEN SecondLevel

WHEN @OfficeLevel=3 THEN ThirdLevel

WHEN @OfficeLevel=4 THEN FourthLevel

END) = @OfficeCode

No comments:

Post a Comment

Screen Record

 Windows Screen Record WindowsKey+ Alt + R Recording Starts.