using SQL Server 2005 with SP4 and I am designing a database table.
Here is the table DDL
CREATE TABLE CPSync4D.ProjectProfilerOption
(
ProjectP
Its worth noting that it is not possible to copy the sql_variant column implicitly.
e.g. Create a backup schema of CPSync4D.ProjectProfilerOption called CPSync4D.ProjectProfilerOption_bkp
and then
Insert into CPSync4D.ProjectProfilerOption_bkp
(
ProjectProfilerOptionID
,ProjectID
,ProfilerOptionID
,ProfilerOptionValue
)
SELECT
ProjectProfilerOptionID
,ProjectID
,ProfilerOptionID
,ProfilerOptionValue
FROM CPSync4D.ProjectProfilerOption
All of the values for ProfilerOptionValue in the backup table will be varchar
Note also: I have been told that the SQL_Variant cannot be used in replication but this is not true. Certainly it can be done with SQL 2008 R2 (that I am using) because I have just done it but this may have been true for older versions (I don't have any older versions to check with so cannot confirm or deny this).
What is true though, is that if you do replicate a table with a SQL Variant in it and have a lot of data and then something goes wrong and you need to fix the data manually, then you might have a nasty piece of SQL to write. This is because when copying the data you cannot copy with several base types in the same copy statement. I guess that replication doesn't have this issue because it does not copy multiple rows (with the obvious exception of the snapshot but that uses bcp).
ps. I realise this is an old post but put this here for other future visitors with the same question.