Saturday, February 25, 2012

Defaut Value for new column in replication

Hi,
I am dealing with merge replication.
I need to add a new column in a table (already in replication) has 500000
records.
I have set 0 as default value for that column.
I want to update that column with a return value of a user-defined function.
Is it possible to call a user-defined function as a default value?
So that it will get sync while adding the column in replication else I have
to update the column separately. Same to be replicated for 20 databases
results in huge amount of data.
Is there any alternative for this?
Please advice.
Thanks,
Soura.
Hi Sounder,
Yes. U can give the UDF as a Default value.
U can do it as a normal default one. In the default Value column specify the
UDF name with the corresponding Owner name and pass the values for parameter.
Thanks,
Herbert
"SouRa" wrote:

> Hi,
> I am dealing with merge replication.
> I need to add a new column in a table (already in replication) has 500000
> records.
> I have set 0 as default value for that column.
> I want to update that column with a return value of a user-defined function.
> Is it possible to call a user-defined function as a default value?
> So that it will get sync while adding the column in replication else I have
> to update the column separately. Same to be replicated for 20 databases
> results in huge amount of data.
> Is there any alternative for this?
> Please advice.
> Thanks,
> Soura.
>

No comments:

Post a Comment