प्रकार nvarchar
की गणना की स्तंभ पर सूचकांक बनाना निम्नलिखित उठाती त्रुटि:SQL सर्वर में अपरिचित कॉलम क्या है?
Cannot create index or statistics 'MyIndex' on table 'MyTable' because the computed column 'MyColumn' is imprecise and not persisted. Consider removing column from index or statistics key or marking computed column persisted.
क्या अनिश्चित स्तंभ मतलब है?
अद्यतन। परिभाषा निम्न है:
alter table dbo.MyTable
add [MyColumn] as dbo.MyDeterministicClrFunction(MyOtherColumn)
go
create index MyIndex on dbo.MyTable(MyColumn)
go
UPDATE2। MyDeterministicClrFunction
निम्नलिखित के रूप में परिभाषित किया गया है:
[SqlFunction(IsDeterministic = true)]
public static SqlString MyDeterministicClrFunction(SqlString input)
{
return input;
}
आप गणना कॉलम मान के लिए किस सूत्र का उपयोग करने का प्रयास कर रहे हैं? – Yuck
क्या यह 'nvarchar (xx) 'या' nvarchar (अधिकतम) 'है? – JNK
'मायऑथर कॉलम' अन्य कॉलम 'nvarchar (50) 'है। –