Actually I did try that before and it also didn't work - because of another issue which I'm finding now - specifically that I can't seem to get column aliases to work.
So, this will work:
and shows this:
But this won't work:
Can you spot what I'm doing wrong?
Thanks,
Jusitn
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Displaying Lookup results in Browse Grid
-
- Posts: 7
- Joined: Thu Sep 23, 2021 1:59 pm
Re: Displaying Lookup results in Browse Grid
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4565
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 529 times
- Contact:
Re: Displaying Lookup results in Browse Grid
When you press CTRL+SHIFT+I you can inspect the generated SQL statements.
-
- Posts: 7
- Joined: Thu Sep 23, 2021 1:59 pm
Re: Displaying Lookup results in Browse Grid
Thanks, using this method it shows me that the generated SQL is:
Therefore I can see that the generated SQL is not using column aliases as I would expect - it is just trying to get a new column called "test" from result set.
It /should/ be:
Am I missing something?
Thanks again.
Code: Select all
SELECT lst_id,lst_subject,test,lst_notes
FROM lesson_set ls LEFT JOIN term t ON t.ter_id = ls.lst_term
WHERE 1
It /should/ be:
Code: Select all
SELECT lst_id,lst_subject,CONCAT(t.ter_year) AS 'test', lst_notes
FROM lesson_set ls LEFT JOIN term t ON t.ter_id = ls.lst_term
WHERE 1
Thanks again.
-
- nuBuilder Team
- Posts: 4565
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 529 times
- Contact:
Re: Displaying Lookup results in Browse Grid
It looks like the SQL parser cannot handle that. (You would need a SELECT * FROM (SELECT ...) construct again)
What's the purpose of this CONCAT anyway?
What's the purpose of this CONCAT anyway?
Code: Select all
CONCAT(t.ter_year) AS 'test'