本文主要是介绍APEX开发过程的一个细节,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
开发过程中发现有一些特殊代码命名有要求
比如
代码:
select "project_id",null LINK_CLASS,apex_page.get_url(p_items => 'P201_PROJECT_ID', p_values => "project_id") LINK,null ICON_CLASS,null LINK_ATTR,null ICON_COLOR_CLASS,case when coalesce(:P201_PROJECT_ID,'0') = "project_id"then 'is-active' else ' 'end LIST_CLASS,(substr("project_name", 1, 50)||( case when length("project_name") > 50 then '...' else '' end )) LIST_TITLE,(substr("project_owner", 1, 50)||( case when length("project_owner") > 50 then '...' else '' end )) LIST_TEXT,null LIST_BADGE
from "JAS_PROJECT_MASTER" x
where (:P201_SEARCH is nullor upper(x."project_name") like '%'||upper(:P201_SEARCH)||'%'or upper(x."project_owner") like '%'||upper(:P201_SEARCH)||'%')and to_char("start_date",'yyyy') = '2024'
--and to_char("start_date",'yyyy') = '2023' --写死的,显示查询数据order by "project_name"
之前用的自己的代码在DataGrip中运行可以展示,但是因为没有用别名命名,APEX页面展示是乱码,后来用了对应别名才正常显示:
之前:
select D.PLATFORM_DEMAND_ID , --需求idD.DEMAND_TITLE --需求名称
from DIGITAL_PLATFORM_DEMAND Dleft join DIGITAL_PLATFORM_DEMAND_HIS Hon D.PLATFORM_DEMAND_ID = H.PLATFORM_DEMAND_IDand D.TENANT_ID = H.TENANT_IDand H.PLATFORM_DEMAND_HIS_ID =(select MAX(e.PLATFORM_DEMAND_HIS_ID)from DIGITAL_PLATFORM_DEMAND_HIS ewhere e.PLATFORM_DEMAND_ID = D.PLATFORM_DEMAND_ID)where (:P261_SEARCH is nullor upper(D.DEMAND_TITLE) like '%'||upper(:P261_SEARCH)||'%')and to_char(D.CREATED_DATE, 'yyyy') = '2024'
之后:
select D.PLATFORM_DEMAND_ID LIST_TEXT, --需求idD.DEMAND_TITLE LIST_TITLE --需求名称
from DIGITAL_PLATFORM_DEMAND Dleft join DIGITAL_PLATFORM_DEMAND_HIS Hon D.PLATFORM_DEMAND_ID = H.PLATFORM_DEMAND_IDand D.TENANT_ID = H.TENANT_IDand H.PLATFORM_DEMAND_HIS_ID =(select MAX(e.PLATFORM_DEMAND_HIS_ID)from DIGITAL_PLATFORM_DEMAND_HIS ewhere e.PLATFORM_DEMAND_ID = D.PLATFORM_DEMAND_ID)where (:P261_SEARCH is nullor upper(D.DEMAND_TITLE) like '%'||upper(:P261_SEARCH)||'%')and to_char(D.CREATED_DATE, 'yyyy') = '2024'
改动的点:
这篇关于APEX开发过程的一个细节的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!