Hi, My work is to count the total number of records present in a table based on some where conditon for the purpose of business validation. for this, we have created a procedure which when executed wil fetch the sum of the records for a column. This is executed with the help of cursor which fetches the count column wise and table wise. For few tables i have taken the count succesfully. But For few tbales I am getting arithmetic overflow error. I am lilsting down the metrics i have used. Please let me know how to use the count_big function here to get the count.
- SUM(CASE WHEN IS NULL THEN 1 ELSE 0 END)’
- SUM(CASE WHEN IS NULL THEN 0 ELSE END)
- SUM(CASE WHEN IS NULL THEN 0 ELSE 1 END)