I am pulling data from multiple tables to populate a Vision Table using a named query. This query worked until I started to add to it. When it failed, I put it back to the original and it did not work.
JOIN usernames ON binder_notes.user_id = usernames.id
WHERE binder_notes.binder_id = :binder_id
When I test it, I get this error message:
GatewayException: org.postgresql.util.PSQLException: The column index is out of range: 2, number of columns: 1.
caused by Exception: org.postgresql.util.PSQLException: The column index is out of range: 2, number of columns: 1.
Ignition v8.0.16 (b2020082513)
Java: Azul Systems, Inc. 11.0.7
Now I am confused as to why it no longer works event when testing in the named query.
Also, I want to add to WHERE so that I get all the records with the selected binder_id, topic_id and page_id.
I think like this:
WHERE binder_notes.binder_id = :binder_id AND binder_notes.topic_id = :topic_id AND binder_notes.page_id = :page_id
The parameters come from a selected value on a dropdown for each table.
I would appreciate any help as basic as I am sure it is as I just don’t understand why it was working fine and then decided no to!