标签: asp.net sql-server entity-framework entitydatasource
我在EntityDataSource CommandText中写了下面的查询。
EntityDataSource CommandText
SELECT FIRST_NAME + ' ' + ISNULL(LAST_NAME, '') AS Customer FROM CUSTOMER
但错误为isnull cannot be resolved into valid type or function。
isnull cannot be resolved into valid type or function
ISNULL
答案 0 :(得分:3)
实体sql中不支持ISNULL。你必须诉诸CASE WHEN:
CASE WHEN
CASE WHEN LAST_NAME IS NULL THEN '' ELSE LAST_NAME END
无法帮助它。