bioffice的一些tips

返回结果集的sql 每个字段必须有 as 别名,不然会出错,比如
/*结果集*/
select first 10
t3.customername,t1.customerid,
round(t1.sumbalance/{%unit%},2),round(t1.overduebalance/{%unit%},2),
round(t1.interestbalance/{%unit%},2),
round(nvl(t3.MAXOVERDUEDAYS,0)/{%unit%},2) as maxoverduedays,
round(nvl(t4.specialfund,0)/{%unit%},2) as specialfund,
round(nvl(t6.otherbalance,0)/{%unit%},2) as otherbalance,'' as jvalue,
round(nvl(t9.kbalance,0)/{%unit%},2) as kbalance,
'' as lvalue,round(t1.LOWRISKBAILSUM2/{%unit%},2)
from mytemp1_$^TEMPTABLEID^$ t1
left join mytemp3_$^TEMPTABLEID^$ t3 on t1.customerid=t3.customerid
left join mytemp4_$^TEMPTABLEID^$ t4 on t1.customerid=t4.customerid
left join mytemp6_$^TEMPTABLEID^$ t6 on t1.customerid=t6.customerid
left join mytemp9_$^TEMPTABLEID^$ t9 on t1.customerid=t9.customerid
order by 3 desc
into mytemp10_$^TEMPTABLEID^$;
其中有几个字段没有 as 别名,则 执行的语句会是
SELECT first 10 t3.customername AS customername,t1.customerid AS customerid,sumbalance,overduebalance,interestbalance,round ( nvl ( t3.MAXOVERDUEDAYS , 0 ) /10000 , 2 ) AS maxoverduedays,round ( nvl ( t4.specialfund , 0 ) /10000 , 2 ) AS specialfund,round ( nvl ( t6.otherbalance , 0 ) /10000 , 2 ) AS otherbalance,'' AS jvalue,round ( nvl ( t9.kbalance , 0 ) /10000 , 2 ) AS kbalance,'' AS lvalue,lowriskbailsum2 FROM mytemp1_76 t1 left join mytemp3_76 t3 on t1.customerid=t3.customerid left join mytemp4_76 t4 on t1.customerid=t4.customerid left join mytemp6_76 t6 on t1.customerid=t6.customerid left join mytemp9_76 t9 on t1.customerid=t9.customerid ORDER BY 3 DESC

发现round函数没有执行,/{%unit%}也没有执行。有可能是bioffice在没有别名的情况下就把字段名默认为参数检测出来的字段(管理工具那边监测出来的)

order by 里面的字段必须在select 列表里面,不然出错。
order by 里面不支持 cast(xx as int)之类的写法
复杂报表设计器里面对excel的格式有很多限制,不支持文字方向为竖直方向,不支持单元格里面ALT+Enter换行
select xx from xx;之后 即返回结果集之后的注释/**/ 不能识别。
静态区域被覆盖。。待解决
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值