2006-10-24
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;之后 即返回结果集之后的注释/**/ 不能识别。
静态区域被覆盖。。待解决
/*结果集*/
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;之后 即返回结果集之后的注释/**/ 不能识别。
静态区域被覆盖。。待解决
发表评论
- 浏览: 394529 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
Gmail
共 8 张
共 8 张
最新评论
-
JIRA不完全手册
楼主,发一份完整的资料给我吧 xwj1003@yahoo.com.cn
-- by volking -
java encoding参考
Good ,thanks.
-- by zuowei -
有多少异常可以重来
我今天也遇到这个问题,才搜到这个帖子~ 还没有解决,等恢复哦
-- by javamanlcy007 -
有多少异常可以重来
这个错误解决了,又抱了别的错误~
-- by iceworld4143 -
有多少异常可以重来
解释不太懂,我也遇到这个问题了,可是我没用ant。 :cry: 等回 ...
-- by iceworld4143






评论排行榜