Thanks to all,
effectively the solution "IN(select pk from table(x int-=?))" was
ridiculously simple, but I was stuck using inner join trying to replicate
the select syntax without an inner query I'm a bit ashamed :-(
Not all days are good days...
Thanks again.
Il giorno mercoledì 12 dicem
Hi,
There's also StackOverflow you could go to for help.
But, basically I think the solution is to use "IN(select pk from table(x
int-=?))". Usually the learning effect is better if people find the
solution themselves...
Regards,
Thomas
On Wed, Dec 12, 2012 at 11:03 AM, Noel Grandin wrote:
>
On 2012-12-12 11:56, Penta wrote:
I already tried "delete from table(x int=?) t inner join mytest on
t.x=mytest.col" and I'm sure this is wrong, not only because I have an
error, but even because I'm not so expert in SQL and I can't even
understand what i wrote, my previous select statement wa
I already tried "delete from table(x int=?) t inner join mytest on
t.x=mytest.col" and I'm sure this is wrong, not only because I have an
error, but even because I'm not so expert in SQL and I can't even
understand what i wrote, my previous select statement was made with a
stupid cut & paste an
Talk about laziness.
How about you try some stuff and see what works or doesn't.
And if you can't figure anything out, then can you come back here.
Hint - the "select pk from table(x int-=?)" part is re-usable.
On 2012-12-12 10:40, Penta wrote:
OK, my fault, I didn't understand the syntax, so
OK, my fault, I didn't understand the syntax, so the correct statement is
"select pk from table(x int=?) t inner join mytest on t.x=mytest.col" and
it works, but what about delete statements? What kind of syntax must I use?
Il giorno martedì 11 dicembre 2012 17:27:23 UTC+1, Noel Grandin ha scrit
Try reading the documentation again.
On Tue, Dec 11, 2012 at 3:57 PM, Penta wrote:
> Hi, i must use an IN clause in a PreparedStatement, and as stated in
> http://www.h2database.com/html/performance.html (Prepared Statements and
> IN(...)) I used the setObject() method.
>
> This is my test case
Hi, i must use an IN clause in a PreparedStatement, and as stated
in http://www.h2database.com/html/performance.html (Prepared Statements and
IN(...)) I used the setObject() method.
This is my test case but something is wrong and no records are returned
from my PreparedStatement. What's wrong?