Aha, I see the syntax error now -- might be some slight difference in the way LOOP works on LispWorks. But I'm on a public computer somewhere, and will not be near any machines running Lisp in the next weeks, so I can't really debug this for you. If you want to solve this, you can try digging into the code in s-sql/s-sql.lisp that produces such queries, and see where it goes wrong (shouldn't be too hard). Or maybe someone else on the list wants to take a quick look?
Cheers, Marijn