Sim Zacks wrote:
>
> I am using MaxDB 7.5.00.12
>
> I am trying to create a view that has the last record of each
> application in the database and I get the following error:
>
> "Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
> General error;-9000 POS(1) System error: Not yet implemented:SELECT IN
> FROM PART OF VIEW."
>
>
> The statement I am using is:
>
> CREATE VIEW MOSTRECENTAPPLICATIONS AS
> SELECT A.* FROM TBLAPPLICATIONS A JOIN
> (SELECT MAX(APPLICATIONID) APPLICATIONID ,FKCANDIDATEID FROM
> TBLAPPLICATIONS
> GROUP BY FKCANDIDATEID) B
> ON A.APPLICATIONid=B.APPLICATIONID
>
> Is there another statement that will get the information I want?
>
CREATE VIEW MOSTRECENTAPPLICATIONS AS
SELECT * FROM TBLAPPLICATIONS
WHERE APPLICATIONid = ANY (
SELECT MAX(APPLICATIONID) APPLICATIONID
FROM TBLAPPLICATIONS
GROUP BY FKCANDIDATEID
)
could do. But there may be a difference:
if you want to have A.* (in your view) resulting in the same row several times if
there are more than one FKCANDIDATEIDs having the same MAX(APPLICATIONID) then my view
will not work as it returns this row only once. If no two FKCANDIDATEIDs will have the
same APPLICATIONID there is no difference in the result of the two view-definitions.
Elke
SAP Labs Berlin
> Thank You
> Sim
>
>
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]