24-10-17, 01:00 PM
كيف يتم تحويل هذا الجزء من الدلة من رقمين عشريين
الي ثلاث ارقام عشرية
الي ثلاث ارقام عشرية
كود :
begin
set @ThreeWords=left(right(round(@TheNo,2),2),2)
SELECT @TheNoWithDecimal= ' و' + ISNULL((SELECT NoName from @Tafket where num=left(right(round(@TheNo,2),2),2) AND @ThreeWords >2),'')
--set @TheNoWithDecimal = @TheNoWithDecimal+ case when @ThreeWords=2 then ' قرشان' when @ThreeWords between 3 and 10 then ' قروش' else ' قرش' end
set @TheNoWithDecimal = @TheNoWithDecimal+ case when @ThreeWords=2 then ' '+@PARENT_CURRENCY when @ThreeWords between 3 and 10 then ' '+@PARENT_CURRENCY else ' '+@PARENT_CURRENCY end
set @ComWithWord = @ComWithWord +' '+ @TheNoWithDecimal
END
set @ComWithWord = @ComWithWord + ' لا غير'+ ' (' +@name_CURRENCY+')'
return rtrim(@ComWithWord)
end