Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: DBD::Sybase prepare statement returns empty query hash but no errstr

by poj (Abbot)
on Oct 31, 2019 at 15:45 UTC ( [id://11108181]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-24 01:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found