I have discovered some issues with the NAB Data Source Editor regarding vvin_virtuals, field aliases, and order by clauses.
I want to make a data source that selects upon a vvin_virtual, and then groups and orders the data by that vvin_virtual. This works fine until I want to make an alias for the vvin_virtual, and then put the alias in the ORDER BY clause. If I try that, I get this error:
SQL0206 - Column or global variable {alias name} not found.
If I try to put the SELECT statement in a CTE and then select from that CTE, ordering by the alias outside of the CTE, I still get the same error.
Interestingly, if I place the "AS {alias name}" from the select clause directly inside of the vv_invirtual, the CTE method mentioned above works.
However, this only works using a CTE. If I were to keep the vv_invirtual mentioned above, go back to using only a select statement, and order by the alias, then the NAB Data Source Editor will proceed to the "Preview" screen and show a popup that says this:
Data Source
Alias added to your column(s) starting with "VV"
The "OK" button on this popup does not work and I have no other choice but to close NAB, meaning that I will never be able to save the data source.
I want to make a data source that selects upon a vvin_virtual, and then groups and orders the data by that vvin_virtual. This works fine until I want to make an alias for the vvin_virtual, and then put the alias in the ORDER BY clause. If I try that, I get this error:
SQL0206 - Column or global variable {alias name} not found.
If I try to put the SELECT statement in a CTE and then select from that CTE, ordering by the alias outside of the CTE, I still get the same error.
Interestingly, if I place the "AS {alias name}" from the select clause directly inside of the vv_invirtual, the CTE method mentioned above works.
However, this only works using a CTE. If I were to keep the vv_invirtual mentioned above, go back to using only a select statement, and order by the alias, then the NAB Data Source Editor will proceed to the "Preview" screen and show a popup that says this:
Data Source
Alias added to your column(s) starting with "VV"
The "OK" button on this popup does not work and I have no other choice but to close NAB, meaning that I will never be able to save the data source.
Comment