问题描述
在Microsoft Word中创建Oracle BI Publisher rdf模板时,预期输出到Microsoft Excel;有没有一种方法可以将数字格式化为文本,从而不会出现前导零?我想打印出电话号码,它们的值例如0215551234;我希望前零显示.在BI Publisher中,它显示为215551234.
When creating an Oracle BI Publisher rdf template in Microsoft Word, with intended output to Microsoft Excel; is there a way to format numbers as text so that leading zeroes don't dissappear? I would like to print out telephone numbers and they have values such as 0215551234; where I want the leading zero to show. In BI Publisher this shows as 215551234.
推荐答案
我不确定您是否仍需要此,但这是我在Internet上找到的一个解决方案示例(它在SQL级别,因此您不必无需担心复杂的XML代码):
I'm not sure if you still need this, but here is an example of a solution I found on the Internet (and it's on SQL level so you don't need to worry about complicated XML codes):
SELECT '="' || q.item_code || '"' excel_display_item_code
FROM (SELECT '00005689' item_code FROM DUAL
UNION
SELECT '00000012' item_code FROM DUAL
UNION
SELECT '01345677' item_code FROM DUAL) q;
这篇关于Oracle BI Publisher-如何将数字设置为文本格式,以使前导零不消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!