On 9/4/07, Madison Kelly <linux@xxxxxxxxxxx> wrote: > Hi all, > > Hopefully a quick question... > > Why does: > > nmc=> SELECT 'Y' AS local FROM domains WHERE dom_name='test.com'; > local > ------- > Y > (1 row) > > Work but: > > nmc=> SELECT 'Y' AS local FROM domains WHERE '@'||dom_name IN > ('mkelly@xxxxxxxx'); > local > ------- > (0 rows) > > Not work? because @dom_name isn't IN mkelly@xxxxxxxx? I think you're looking for pattern matching. select 'Y' as local from domains where dom_name ilike '%test.com%' ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/