You wrote articletype instead of articletypes in the first WHERE clause: is this the problem?
Regards Marco -- Marco Bizzarri http://iliveinpisa.blogspot.com/ ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/