旋转时转义字符 [%] 和空格返回 null [英] Escape characters [%] and blank space when pivoting returns null
本文介绍了旋转时转义字符 [%] 和空格返回 null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
发现另一个问题.脚本运行但返回空
Found another issue. The script runs but returns null
我使用以下方法进行透视(引用是由于语句包含在exec语句中)
I am using the following method to pivot (The quotations are due to the statement being contained in exec statement)
max(case when Name = ''[COutputData_2_Best class match]'' then value end) COutputData_2_Best_class_match,
max(case when Name = ''[COutputData_2_Magnesium Stearate [%]]]'' then value end) COutputData_2_Magnesium_Stearate_percentage
两列的结果都是空的?
推荐答案
简单使用以下
max(case when Name = ''COutputData_2_Best class match'' then value end) COutputData_2_Best_class_match,
max(case when Name = ''COutputData_2_Magnesium Stearate [%]'' then value end) COutputData_2_Magnesium_Stearate_percentage
这篇关于旋转时转义字符 [%] 和空格返回 null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文