I have issue when creating the output. Does anyone know what it is?
Solved! Go to Solution.
Hi @tnguyen3148
Change the 255.2 to 19.2 and try again.
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.
@tnguyen3148 , The issue with the data type of Tax Expense, In decimal you cannot have 254 precision. The maximum value for precision can be 31. So please change the data type of this column either change the precision or you can store it as string and change to exponential if the value is large.
Please accept it if it was useful.
the answer is resolved. But I'm still wondering why my professor told us to set 255.2 instead of 19.2. My professor does not have the issue like mine even though she set the fixed decimal as 255.2
Hi @tnguyen3148
Are you sure that he did that for this field? Usually people use 255 for string fields, so maybe there is some type of misunderstood here.
For example, the maximum allowed precision for numeric fields in SQL Server 2022 is 38 (far less than 255).
Precision, scale, and length (Transact-SQL) - SQL Server | Microsoft Learn
If you want to understand better what this numbers are about, take a look at this example (size 10.4). 255 is just too much.
Thanks. Finally I got it 😀