Change the following code to sql server derived column code

if ([DOCUMENT_TYPE_CODE] = ‘R8’)
then
if (([CLAIM_QUANTITY]) >= 0)
then return ‘CR’;
else return ‘DR’;

else if ([DOCUMENT_TYPE_CODE] = ‘R9’)
then
if (([CLAIM_QUANTiTY)] >= 0)
then return ‘CRS’;
else return ‘DRS’;
else if ([DOCUMENT_TYPE_CODE] = ‘R$’)
then return ‘DCC’;
else
return null;

Welcome to the developer forum.

Are you looking for ChatGPT? https://chat.openai.com