S
S
Steve2021-06-18 10:45:34
PostgreSQL
Steve, 2021-06-18 10:45:34

ERROR: invalid reference to FROM-clause entry for table "t"?

SELECT c.*, t.id, t.campaign_status_id, t.search, d.list
FROM   campaign t, LATERAL (
  SELECT array_agg(value::int) AS list
  FROM   jsonb_array_elements_text(t.search->'tags_in')
  ) d
LEFT JOIN campaign_status c ON t.campaign_status_id = c.id
where d.list && array[102,83,55]


Why is there an error in this request?
[42P01] ERROR: invalid reference to FROM-clause entry for table "t" Hint: There is an entry for table "t", but it cannot be referenced from this part of the query.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question