is it possible to use IIF() in TSQL
im using the code in MS ACCESS but doesnt work in SQL ServerCode:select IIF(pk_pono='NA',pk_rfgno,pk_pono)
from tblrequisitionmaster
Printable View
is it possible to use IIF() in TSQL
im using the code in MS ACCESS but doesnt work in SQL ServerCode:select IIF(pk_pono='NA',pk_rfgno,pk_pono)
from tblrequisitionmaster
In T-SQL you would use CASE.
perfect! thnx.
select
case pk_pono
when 'NA' then pk_rfgno
else pk_pono
end