I have a table that contain column with VARBINARY(MAX)
data type. That column represents different values for different types in my c# DB layer class. It can be: int
, string
and datetime
. Now I need to convert that one column into three by it's type. So values with int
type go to new column ObjectIntValue
and so on for every new column.
But I have a problems with transmitting data to datetime
column, because the old column contains datetime
value as a long
received from C# DateTime.ToBinary
method while data saving.
I should make that in TSQL and can't using .NET for convert that value in new column. Have you any ideas?
Thanks for any advice!