Hi @Saravanaraj-6475,
Welcome to Microsoft Q&A!
Could you please let us know what does 24000 refer to in your query?
It could be better to provide the value of @total _Mem_Mb and your expected output.
Please refer below and check whether it is helpful.
DECLARE @Total_Mem_Mb DECIMAL;
SELECT @Total_Mem_Mb = (physical_memory_kb / 1024)
FROM sys.dm_os_sys_info;
IF @Total_Mem_Mb>=625000 AND @Total_Mem_Mb<=725000
SELECT ROUND(@Total_Mem_Mb, (LEN(@Total_Mem_Mb) - 3) * (-1)) - ROUND(@Total_Mem_Mb*0.1, (LEN(@Total_Mem_Mb*0.1) - 3) * (-1))
Or using one of below to replace above:
SELECT @Total_Mem_Mb- ROUND(@Total_Mem_Mb*0.1, (LEN(@Total_Mem_Mb*0.1) - 3) * (-1))
SELECT ROUND(@Total_Mem_Mb, (LEN(@Total_Mem_Mb) - 3) * (-1)) - @Total_Mem_Mb*0.1
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.