Subquery returning tuple? where (a, b) not in (select c, d from ...)
53 views
Skip to first unread message
dimgel
unread,
May 5, 2015, 7:35:31 PM5/5/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to quer...@googlegroups.com
Hello all. How can I do subj?
Something like .where(new QTuple(t1.a, t1.b).notIn(new SQLSubQuery().from(t2).list(t2.c, t2.d))), although this does not compile: QTuple have no notIn() method.
Thanks.
timowest
unread,
May 12, 2015, 12:06:03 PM5/12/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to quer...@googlegroups.com
You can use ExpressionUtils.notIn for the NOT IN operation.
dimgel
unread,
May 12, 2015, 6:27:23 PM5/12/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to quer...@googlegroups.com
Thank you. But there's a error in generated SQL: no braces around tuple: where a, b in (select c, d from ...). Is there anyway to workaround?
timowest
unread,
May 13, 2015, 4:45:48 PM5/13/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to quer...@googlegroups.com
QTuple are meant for result definition and post processing.
If you need a list you can use Expressions.list(...).in(new SQLSubQuery()...)
dimgel
unread,
May 13, 2015, 5:14:20 PM5/13/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message