if
exists (select * from dbo.sysobjects where id = object_id(N'[dbo].CC') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop
table [dbo].CC
GO
CREATE
TABLE [dbo].[CC] (
[Field1] [varchar]
(7) NOT NULL ,
[field2] [int]
NOT NULL ,
[field3] [tinyint]
NULL ,
[field4]
bit DEFAULT dbo.fn_DetermineNonReplenish([field1], [field3], [field2])
)
GO
Below is a error message:
Msg 128, Level 15, State 1, Line 6
"The name 'CIN' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted."
Is there any other way I can use to achieve the same purpose of the above UDF function(fn_DetermineNonReplenish)?