在 Birt 报告中,我可以为此使用哪个表达式(我是 SQL 的新手)



Table LABORCRAFTRATE有以下数据,

劳动代码工艺

PC90774连接 JB62299替换 RP61816替换

If CRAFT = CONNECT,
then Yes,
else 
blank in column Connections. 
If CRAFT = REPLACE, 
then Yes, 
else 
blank in column Replacement.

我需要如下所示的报告输出

人工代码连接替换

PC90774 是 JB62299 是 RP61816 是

在此处输入图像描述

你可以试试这个

SELECT IF(craft='connect','yes','') as connection,
IF(craft='replace','yes','') as replacement
FROM .....

您可能会阅读一些参考资料。 https://www.w3schools.com/sql/func_mysql_if.asp

相关内容

最新更新