Select coditem from item where codmenu=0 and designacao = 'menu' order by ordem&erro=ERROR: operator does not exist: character varying = integer LINE 1: ...E = 'ISO'; Select coditem from item where codmenu=0 and des... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.