我想在stored procedure
中为我的列名提供别名,但它不是我想要的。以下是我试过的代码
STREX:='SELECT DISTINCT AM.APP_MST_ID, NVL(AM.APPLICATIONNAME,''-'') as ''APPLICATION NAME'', NVL(AD.URLPATH,''-'')URL, NVL(AM.PROJECTNO,''-'')PROJECTNO, NVL(AM.VSS_FOLDER_LOC,''-'')VSSFOLDERLOC,
NVL(AU.NAME, ''-'')SPOCUSER, NVL(AUR.NAME,''-'')REQUESTEDBY, NVL(AUD.NAME,''-'')DELIVERYMANAGER
FROM APPLICATION_MASTER AM
INNER JOIN APPLICATION_DETAILS AD
ON AM.APP_MST_ID = AD.APP_MST_ID
INNER JOIN APPUSER_UMS AU
ON AM.APP_MST_ID = AU.APP_USERID
INNER JOIN APPUSER_UMS AUR
ON AUR.APP_USERID = AM.REQUESTED_BY_APPUSRID
INNER JOIN APPUSER_UMS AUD
ON AUD.APP_USERID = AM.DELIVERY_MANAGER_APPUSRID
WHERE UPPER(AM.'|| P_PARAM_TYPE || ') ' || P_OPERATOR || ' :PARAM';
/* WHERE AM.'|| UPPER(P_PARAM_TYPE) ||' '|| P_OPERATOR || ' :PARAM'; */
DBMS_OUTPUT.PUT_LINE('STREX '|| STREX);
OPEN P_RETURN FOR STREX USING VAL;
我想显示为第一列的应用程序名称
答案 0 :(得分:2)
尝试:
...SELECT DISTINCT AM.APP_MST_ID, NVL(AM.APPLICATIONNAME,''-'') as "Application Name"...
双引号(")用于指定标识符名称,单引号(')用于分隔数据中的字符串。