can one column hold different data types?
Posted on 2008-10-15
i think my answer is no. this is the situtation:
i have one column that now is "money". But i have data that i want to hold in this column that's percentage as well. right now, when i display this column thru my code...i see the percentage as $:
select total from tableand when i display it in code..i see:
My amount: $6000
My percentage: $8.1 (this should be 8.1%)
--- i thought about having it as varchar, then casting it. i thought about having a case statement...
case when "money" then <cast value as money>
when "percentage" then <cast value as percentage>
but not sure..any ideas/