I created a view object for scott.emp table I added a transient attribute, then change the default value to be from SQL and wrote statement like this:
select max(nvl(sal, 0)) from emp where deptno = view.deptno
my problem is: how to pass view.deptno as parameter to sql statement ?
running the page ,I have got an error.
ORA-00904: "EMP_VO"."DEPTNO": invalid identifier
If you check your VO's query, it should looks similar to this:
SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE, Emp.SAL, Emp.COMM, Emp.DEPTNO, (select max(nvl(sal, 0)) from emp where deptno = Emp.DEPTNO) FROM EMP Emp