Hi

So is it possible to write ANSI sql for the below one.
SELECT w.test_id,
(SELECT comp_code FROM compnay WHERE compnay_id = W.VALUE
)
FROM testTable W where w.value !='Some'


Here testTable contains a column "value(VARCHAR)" and it can have both integer and string values.
But company_id is an integer field .Its working when connecting to oracle .But not working in postgresql.(org.postgresql.util.PSQLException: ERROR: operator does not exist: numeric = character varying)

Can any one suggest a standared way to do this in all db if that is possible.

Regards