[postmodern-devel] Converting a SQL statement with subquery into S-SQL

Ivan Boldyrev lispnik at gmail.com
Sat Dec 26 15:12:53 UTC 2009


On Sat, Dec 26, 2009 at 8:23 PM, Sam Alves <sam at oshean.org> wrote:

> Here's my best attempt:
>
>     :SELECT '* :FROM 'filter
>
>     :WHERE 'title
>
>     :IN (:SELECT 'filter_title :FROM user_filter :WHERE (:= 'user-id 3))
>
> However, I get the following error:
>
>     Keyword WHERE takes exactly one argument
>
> I've tried the SQL query in psql so I know it works, but I can't seem to
> come up with an equivalent s-sql statement.
>
>
(:select '* :from 'filter :where
    (:in 'title (:SELECT 'filter_title :FROM user_filter :WHERE (:= 'user-id
3))))

-- 
Ivan Boldyrev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20091226/3838e31c/attachment.html>


More information about the postmodern-devel mailing list