Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将新列“temp”添加到数据表中,如下所示
datatable.Columns.Add( 'temp', typeof(string), "Convert(IFF(" + column + " like '%#' == True ,'isTrue','isFalse'), 'System.String')");
但我收到一个错误:“表达式包含未定义的函数调用 IFF()。”
简单的错字:IFF应该是IIF.
IFF
IIF
我还认为您的 IIF 语句中的条件表达式有问题。试试这个:
datatable.Columns.Add("temp", typeof(string), "Convert(IIF(" + column + " like '%#','isTrue','isFalse'), 'System.String')");