On Wednesday, June 17, 2020 at 5:36:48 AM UTC-7, Aryk Grosz wrote: > > Yeah, I'm living on the edge over here! > > I tried it and it "kind of" works in that they sql works and on simple > stuff I get the right results, BUT when I tried to replace the filter > conditions in my code on complicated queries, my tests started failing > because it wasn't returning the right results...so I'm not quite sure. > > I couldn't find any literature on the internet about "comma delimited > subqueries with IN" clause so it must not be a thing to do... > > Curious what Jeremy thinks. >
I can say that: ds.exclude(id: [ds1, ds2]) is not likely to work correctly if ds1 and ds2 are datasets unless ds1 and ds2 return a single row with a single column. I'm not sure what the problem is with using: ds = ds.exclude(id: ds1) if x ds = ds.exclude(id: ds2) if z ds = ds.exclude(id: ds2) if y That is certainly the approach I would use, though assuming your example doesn't include a typo (ds2 used both for z or for y), I would do: ds = ds.exclude(id: ds1) if x ds = ds.exclude(id: ds2) if z || y Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/fb8283cb-19c0-463a-83af-4dd32eb4e9d9o%40googlegroups.com.
