我需要仅当列"stato prenotazione“为"IN SOSPESO”时才显示"elabora“按钮。我试图设置一个条件,但我不知道如何选择列值

发布于 2018-01-22 22:04:18
如果我理解你的问题,这可能会有帮助:
对于您的报告来源:
SELECT
CASE
WHEN stato_prenotazione = 'in sospeso' THEN 'elabora prenotazione'
ELSE ''
END name_of_column,
prenotazione,
username,
nome,
cognome,
viaggio,
stato_viaggio,
data_prenota,
stato_prenotazione,
numero_ospiti
FROM your_table然后将"name_of_column“列设置为type: link,并填充目标。
发布于 2018-01-23 14:46:53
将条件包含在SQL中对apex_page.get_url的调用中,这样它只会在相关的时候生成一个链接。
使用中的函数示例,sans条件:https://azureoutput.wordpress.com/2017/10/18/custom-hyperlink-in-interactive-report/
使用这个来让按钮看起来更漂亮,也许还会得到一些其他的想法https://www.grassroots-oracle.com/2015/12/tutorial-include-action-button-in-report.html
关于转义特殊字符,请查看此内容,否则在报告https://www.grassroots-oracle.com/2017/01/escape-special-characters-apex-demo.html中只会看到超文本标记语言
发布于 2018-01-27 03:22:42
正如@sara提到的,这可以通过一个简单的case语句来解决。类似于:
select (case stato_prenotazione when 'in sospeso' then 'elabora prenotazione' end) as your_column
我不会保留else条件,这样如果条件不满足,列将只包含空值。
https://stackoverflow.com/questions/48380440
复制相似问题