0
GOAL
I need to make a select inside another select using the LIKE operator converting the value of the other select to LOWER, but it is returning error
QUERY
select *
from tbl_client
where "NODE" like ('%'select lower("HOST") from ahc_msystems where "NODE" = 'UTE:pdo-sc03zdbdam030507:NT''%')
OUTPUT
ERROR: syntax error at or near "select" Line: 1
It seems to me that your command is wrongly built. You are assuming that what is in parentheses is a string formed by concatenating the '%' with the result of SELECT but did not build the command properly. Does the "NODE" field exist in the two tables used? Maybe the position(substring in string) function can help you.
– anonimo
There is, I’ll test...
– Luis Henrique