DECLARE @mathieu.company _ID VARCHAR(450)='1006274'
DECLARE @PackageDrawingNumber VARCHAR(450)=NULL
DECLARE @PartOrderSuffix VARCHAR(450)='N/A'
DECLARE @CountOfPCBConnectedPin VARCHAR(450)='N/A'
DECLARE @DKDrawingNumber VARCHAR(MAX);
IF @PartOrderSuffix='N/A'
SET @PartOrderSuffix=''
IF @CountOfPCBConnectedPin='N/A'
SET @DKDrawingNumber = isnull( @mathieu.company _ID, ' ')
SET @DKDrawingNumber = @DKDrawingNumber
+ IIF( ISNULL(@PackageDrawingNumber, '') = '', '', '~ ' + @PackageDrawingNumber)
+ IIF( ISNULL(@PartOrderSuffix, '') = '', '', '~ ' + @PartOrderSuffix)
+ IIF( ISNULL(@CountOfPCBConnectedPin, '') = '', '', '~ ' + @CountOfPCBConnectedPin)
-- + isnull('~ '+isnull(@PackageDrawingNumber,''),'') + isnull('~ '+@PartOrderSuffix,'')
SELECT @DKDrawingNumber