I have to deal with a quite badly designed table on a regular basis. The table stores money amounts as varchar. I also often need to get the value of one column minus another. So I have to type this out every time…
cast(total_bet_amount as money)-cast(refund_amount as money) as handle.
It can get quite tedius if I need to get some info quickly.
So I thought about adding a computer column with the above calculation.
I am guessing the value is never stored? So it shouldn’t increase the size of the table too much?
The table is about 5.7gb in size and contains about 21 million rows.