从表中插入信息以显示在文本之后

时间:2011-07-28 16:59:35

标签: sql

CASE WHEN system_type__c IS NOT NULL 
THEN 'Please setup a new system [' + system_type__c + '] for new employee ' + 'New_Employee_Name__c' ELSE '' END AS SystemTypeDesc, 

我的代码无法正常工作。我希望在“请设置新系统”文本之后添加输入New_Employee_Name__c字段的文本

我已正确输入system_type__c字段。

4 个答案:

答案 0 :(得分:1)

从'New_Employee_Name__c'周围取出引号?

答案 1 :(得分:1)

从字段名称中取出引号。

CASE WHEN system_type__c IS NOT NULL THEN 'Please setup a new system [' + system_type__c + '] for new employee ' + New_Employee_Name__c ELSE '' END AS SystemTypeDesc,

答案 2 :(得分:1)

从字段名称中取出引号:

CASE WHEN system_type__c IS NOT NULL 
    THEN 'Please setup a new system [' + system_type__c + '] for new employee ' + New_Employee_Name__c ELSE '' END AS SystemTypeDesc,

答案 3 :(得分:1)

New_Employee_Name__c 中删除引号。单引号表示文字字符串。

CASE WHEN system_type__c IS NOT NULL THEN 
    'Please setup a new system [' + 
    system_type__c + 
    '] for new employee ' + 
    New_Employee_Name__c 
ELSE '' 
END AS SystemTypeDesc,