sql:executeQuery($fnm:conn,'select c_data from 表1 where c_report_code = 'REP_CW_LRB'
and c_report_type = 'REPORT_SEASON'
and c_port_code = :name1
and n_row_num = (select n_row_num from 表2 where c_report_code = 'REP_CW_LRB' and c_cell_content like '%净利润%')
and n_col_num = 1
and c_report_time like (
case
when :name2 = '报告代码1' then '%03-31'
when :name2 = '报告代码2' then '%06-30'
when :name2 = '报告代码3' then '%09-30'
when :name2 = '报告代码4' then '%12-31' else '' end)',(':name1',$v1, ':name2',$v6))/sql:c_data/xs:decimal(.)
【formula】sql+select from where case when
最新推荐文章于 2023-04-09 23:15:10 发布