[postmodern-devel] query with keyword :on
Jens Teich
info at jensteich.de
Thu Aug 16 23:02:06 UTC 2007
Marijn Haverbeke wrote:
> So could you give me the error message? That might give me a chance to
> figure out what the problem is.
>
> Cheers,
> Marijn
Here are two queries which should produce the same result
WEBCAT 36 > (postmodern:with-connection ("web_access" "web_access" "***" "localhost")
(postmodern:query
(:select 'pmw.wert
:from (:as 'projekt-merkmale-werte 'pmw)
(:as 'projekt-elemente 'pe)
:where (:and
(:= 'pmw.guid-produkt 'pe.guid-objekt)
(:= 'pe.guid "rzt732819vlurc5827955302wwxz8b")
(:= 'pmw.merkmal-id "MID1008519")
(:= 'pmw.lang-id "de")))))
(("30 N") ("30 N") ("30 N") ("30 N"))
WEBCAT 37 > (postmodern:with-connection ("web_access" "web_access" "***" "localhost")
(postmodern:query
(:select 'pmw.wert
:from (:as 'projekt-merkmale-werte 'pmw)
:inner-join (:as 'projekt-elemente 'pe)
:on (:= 'pmw.guid-produkt 'pe.guid-objekt)
:where (:and
(:= 'pe.guid "rzt732819vlurc5827955302wwxz8b")
(:= 'pmw.merkmal-id "MID1008519")
(:= 'pmw.lang-id "de")))))
Error: Database error 42601: syntax error at or near "on"
Query: (SELECT pmw.wert FROM projekt_merkmale_werte AS pmw INNER JOIN projekt_elemente AS pe ON (pmw.guid_produkt = pe.guid_objekt), projekt_elemente AS pe, on, (pmw.guid_produkt = pe.guid_objekt) WHERE ((pe.guid = 'rzt732819vlurc5827955302wwxz8b') and (pmw.merkmal_id = 'MID1008519') and (pmw.lang_id = 'de')))
Jens
More information about the postmodern-devel
mailing list