Skip to content
Advertisement

how to join with IIF function?

Hi I am using MSSQL 2017 and try to figure out how this code works

The code gives result like (https://i.stack.imgur.com/qxs2G.png) enter image description here But I think it should return like this (https://i.stack.imgur.com/x3B19.png) https://i.stack.imgur.com/x3B19.pngenter image description here Any advice? Thank you!

Sorry for the image, I can’t post image directly because of not enough reputation.

Advertisement

Answer

The right join by doing this just do this:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement