Hi,
I'm trying to use queries such as:
SELECT a, b, c FROM foo WHERE id IN (1, 2, 3)
While it's possible to nest queries with IN:
(:select 'a 'b 'c :from 'foo :where (:in 'id (:select 'd :from 'bar)))
It's not possible to have:
(:select 'a 'b 'c :from 'foo :where (:in 'id (list 1 2 3))
=> Value (1 2 3) can not be converted to an SQL literal.
Would you be ok with lists being converted to (a, b, ...) SQL literals ?
Regards,
See http://marijnhaverbeke.nl/postmodern/s-sql.html#set . (You want (:in foo (:set 1 2 3)) , or, when the set is not static, (:in foo (:set x)) where x holds a list.
Marijn Haverbeke marijnh@gmail.com writes:
See http://marijnhaverbeke.nl/postmodern/s-sql.html#set . (You want (:in foo (:set 1 2 3)) , or, when the set is not static, (:in foo (:set x)) where x holds a list.
Perfect! Thank you for your help.
postmodern-devel@common-lisp.net