Seems I'm rusty at my sql and could use some help.
I'm running into an issue on the search query below:
SELECT COUNT(1) as totalITCount FROM it_table
JOIN i_table on i_table.key = it_table.item_key
WHERE
(key IN (select item_key from it_table where LOWER(it_table.resolution_feild) LIKE ? OR it_table.resolution_field = '' group by item_key) )
and the error coming from the operation is:
nested exception is org.postgresql.util.PSQLException: ERROR: column reference "key" is ambiguous.
I'm not sure what this means. I have another field present in both tables and in that case I "oddly" DON'T see this error. I'd think if anything having a field in two places would make the operation ambiguous, so I'm even more confused.
Thoughts?