Custom Filter NOT IN

50 views
Skip to first unread message

Joseph Marikle

unread,
Mar 7, 2016, 2:46:43 AM3/7/16
to Sequel Pro
I recently had the need to create a quick custom filter for "NOT IN" and I thought it would be really easy considering the "IN" filter already exists, but I ended up having to specify

$CURRENT_FIELD NOT IN (${})

as my rule with the optional "suppress leading <field> placeholder" checked.  The resulting rule preview is "SELECT * FROM <table> WHERE <field> NOT IN ([arg])" in either case, but without suppressing the leading <field> placeholder, it kicks back a SQL error.  Specifically it gives me

MySQL said: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN (1,2,3,7) LIMIT 0,1000' at line 1

Any idea why it would work in the one case but not the other?
Reply all
Reply to author
Forward
0 new messages