简体   繁体   中英

Deserialize varbinary column in SQL

I have done a CLR table valued function to read data form .dat files. In DataBin column I serialized measured values and save it as a varbinary data type in SQL Server. There I saved the time column with each other measured values.

我的CLR表值函数的结果

Now I want to serialize this column and save this measured values into a table that looks like this below and save each time value with each other measured value

在此处输入图片说明

Should I do a function in C# for this? How will this look like?

I think you should write a C# function to parse data from binary column then insert back to new table.

  1. Convert data from binary data object field to string
  2. Using Regex to separate data for each field
  3. Insert data from Regex result back to table database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM