There is no “IIF” function in SQLSERVER as of VB and Access.
For example, say you had a table like this:
StudID Subject Marks------ ------ ------1 Maths 801 Physics 751 Chemistry 601 English 45
Use the “Case” Command in SQLServer:
--//////////////////////////////SELECT StudID,Subject,Marks,Status = CASE WHEN Marks > 50 THEN "Passed" ELSE "Failed" ENDfrom tblMarks--//////////////////////////////StudID Subject Marks Status------ ------ ------ --------1 Maths 80 Passed1 Physics 75 Passed1 Chemistry 60 Passed1 English 45 Failed
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























