SQL for Browse only works with very simple SELECT queries
Posted: Mon Mar 20, 2023 5:41 am
Greetings,
I'm trying to set up the SQL to provide choices for browsing in a Browse and Edit form, but the only thing that works are the simplest SELECT queries. Perfectly valid SQL that works in mysql in a terminal window including a JOIN or other SQL clauses doesn't work. Why is this? Is there some way around it? In particular, I have some tree-structured data that I would like to be able to browse with a computed name that contains the concatenation of the elements that form a path (for example, root:level1:level2) and it's pretty straightforward to calculate these names using a Common Table Expression which works fine in mysql 8.0 in a terminal, but yields nothing when that SQL is entered into the Browse form. I then tried pre-computing the concatenated names into another table and trying to JOIN them in a query, but that doesn't work either.
What am I missing? Is there some other way to use a custom arbitrary chunk of SQL as long as it returns IDs that nuBuilder know about?
Thanks,
--Douglas Mandell
I'm trying to set up the SQL to provide choices for browsing in a Browse and Edit form, but the only thing that works are the simplest SELECT queries. Perfectly valid SQL that works in mysql in a terminal window including a JOIN or other SQL clauses doesn't work. Why is this? Is there some way around it? In particular, I have some tree-structured data that I would like to be able to browse with a computed name that contains the concatenation of the elements that form a path (for example, root:level1:level2) and it's pretty straightforward to calculate these names using a Common Table Expression which works fine in mysql 8.0 in a terminal, but yields nothing when that SQL is entered into the Browse form. I then tried pre-computing the concatenated names into another table and trying to JOIN them in a query, but that doesn't work either.
What am I missing? Is there some other way to use a custom arbitrary chunk of SQL as long as it returns IDs that nuBuilder know about?
Thanks,
--Douglas Mandell