Crystal reports with not in function and inner select
my question is i have this query and im planning to do a report from this. my problem is how do i do the not in from the inner select of the report?
select prop_acct_no,land_book_value, impr_Book_value,current_book_value,lat_appr from prop_acct
where
PROP_ACCT.PROP_STATUS = 'CON' and
PROP_ACCT.SUBSTATUS in ('AFS', 'FAS') and
PROP_ACCT.IL_STATUS ='N' and
PROP_ACCT.PROP_ACCT_NO not in
(select PROP_ACCT_NO from SP_DETL, SP_MAST where SP_DETL.SP_NO 开发者_高级运维= SP_MAST.SP_NO and STATUS = 'Approved')
Many Thanks!
You can make a view/stored procedure out of that query and have crystal use that view/stored procedure. It's better to use stored procedure. It's difficult to write complicated query in crystal from my experience working with it.
Use the Add Command to Report option (found in the connection folder for an active Database Files or ODBC data source) to add your query to the report.
精彩评论