RE: [firebird-support] NOT EXISTS returns 'no current record for fetch operation'

2012-04-19 Thread Rick Debay
In case anyone is confused as to what I'm trying to accomplish, it's an outer join on line items where both sides match with no NULL items. If my approach is poor, then I won't have to worry about question about the exception. SELECT po.ID, pb.ID FROM RPL_PO po JOIN RPL_POBILL pb ON pb.PO

RE: [firebird-support] NOT EXISTS returns 'no current record for fetch operation'

2012-04-19 Thread Leyne, Sean
Rick, > In case anyone is confused Count me as one of them! as to what I'm trying to accomplish, it's an outer > join on line items where both sides match with no NULL items. > If my approach is poor, then I won't have to worry about question about the > exception. > What happens with this qu

RE: [firebird-support] NOT EXISTS returns 'no current record for fetch operation'

2012-04-19 Thread Svein Erling Tysvær
>In case anyone is confused as to what I'm trying to accomplish, it's an outer >join on line >items where both sides match with no NULL items. >If my approach is poor, then I won't have to worry about question about the >exception. > >SELECT po.ID, pb.ID >FROM > RPL_PO po > JOIN RPL_POBILL pb

RE: [firebird-support] NOT EXISTS returns 'no current record for fetch operation'

2012-04-20 Thread Rick Debay
I tried the queries Sean and Svein suggested, and they didn't throw an exception. I then ran my original query to compare, and it WORKED. Is my database haunted? The only thing that could have changed is that a backup ran overnight which would have collected garbage, and any transactions that wer

RE: [firebird-support] NOT EXISTS returns 'no current record for fetch operation'

2012-04-20 Thread Rick Debay
> I think it is likely that your query could be improved. Am I right in assuming that you want > there in ALL cases where there is an RPL_PO_ITM to also exist at least one RPL_POBILL_ITM > record and that all matching RPL_POBILL_ITM must have COST defined? No. In all cases for each RPL_PO_ITM.NDC