in reply to Re^2: DBD::Sybase prepare statement returns empty query hash but no errstr
in thread DBD::Sybase prepare statement returns empty query hash but no errstr

is there something wrong with my query?

Maybe but I'm having difficulty understanding it

select * into #debt from debt makes a temporary copy of debt.

Next query looks for records in debt that are not in the copy #debt.

select * from debt where (debt_id NOT IN ( select * from #debt ) )
I wouldn't expect there to be any ?

poj

Replies are listed 'Best First'.
Re^4: DBD::Sybase prepare statement returns empty query hash but no errstr
by rhysshadow (Novice) on Nov 04, 2019 at 16:41 UTC

    When I run the query in Sqlexec, I get results. I ended up going a different route by selecting distinct debtor_ids, and then taking slices of the array and selecting from the database where debtor_id IN ($ids). And that is working.