您只能使用一组
WHEN/
THEN语句和
EXISTS:
SELECt (CASE WHEN LEFt("_PROJECT_NUMBER",2) = 'C0' THEN '('||"_PROJECT_NUMBER"||') '||"_PROJECT_DEscriptION" WHEN LEFt("_PROJECT_NUMBER",2) = 'L0' AND EXISTS (SELECT "Rollup_Project" FROM "Project_Rollup_Mapping" WHERe "PA_ACCOUNTED_TEST"."_PARENT_PROJECT_NUMBER" = "Project_Rollup_Mapping"."Project") THEN (SELECt "Rollup_Project" FROM "Project_Rollup_Mapping" WHERe "PA_ACCOUNTED_TEST"."_PARENT_PROJECT_NUMBER" = "Project_Rollup_Mapping"."Project") ELSE "_PARENT_PROJECT_NUMBER" END) AS Rollup_Project2FROM "PA_ACCOUNTED_TEST";
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)