有人可以帮助将此顶点查询转换为oracle存储过程吗?我不理解的部分是if语句它不返回任何值。感谢
DECLARE
P_RESULT VARCHAR2(4000) ;
BEGIN
P_RESULT := 'SELECT /*+ RESULT_CACHE */ D.ORGANIZATION_NAME as ORG_NAME,
UDD.FS_STATEMENT_NUM FS_STATEMENT_NUM,(select DOC_DATE_TIME FROM U_DOCUMENT UD WHERE
UD.FS_STATEMENT_NUM = UUI.FS_STATEMENT_NUM AND UD.MISCELLANEOUS_NUM = ''0'') AS FILE_DATE,
FROM U_DET D,
U_DOCUMENT_DET UDD,
where D.DET_TYPE=''O'' AND UDD.DET_NUM=D.DET_NUM
AND UDD.FS_STATEMENT_NUM=UUI.FS_STATEMENT_NUM
AND (UUI.MAT_DATE > ''' || to_date(local.pkg_bs_common.CHECK_FS_STATUS(:P5_DS_STATUS),'dd-mon-yyyy') || ''' OR UUI.MATURITY_DATE IS NULL)';
if :P5_ORGN_NAME is not null then
P_RESULT := P_RESULT || ' AND (D.ORGANIZATION_NAME LIKE ''' || upper(:p5_ORGN_NAME) || '%'' OR D.FORMATTED_ORGANIZATION_NAME like
''' || local.pkg_bs_common.orgname_format(upper(:p5_ORGN_NAME)) || '%'')';
END IF;
--HTP.P(P_RESULT);
RETURN P_RESULT ;
END;
答案 0 :(得分:2)
在第List<WebElement> list = driver.findElements(By.xpath("//a"));
for (int i=0;i<list.size();i++){
if(list.get(i).getText().equalsIgnoreCase("cacique intimates M"))
{
new Actions(driver).moveToElement(list.get(i)).click().build().perform();
System.out.println("Clicked on Parent Category");
new Actions(driver).moveToElement(list.get(i)).moveToElement(driver.findElement(By.linkText("SPECIALTY BRAS"))).click().build().perform();
break;
}
}
行中,参数:P5_ORGN_NAME为第5页P5_ORGN_NAME会话值的bind variable。从顶点开始,您将作为块定义中的参数传递。
如果您需要在会话上下文中调用该过程,则可以用
替换该行 if :P5_ORGN_NAME is not null then
或
if (V('P5_ORGN_NAME') is not null) then
同样适用于每个:P5_ORGN_NAME或:P5_DS_STATUS调用您的代码。
但在此之前你应该用以下内容包装:
if (APEX_UTIL.GET_SESSION_STATE('P5_ORGN_NAME')) is not null then
确保始终有效会话。