Issue:
Renaming a field in SQL that is not transformed in some way (transformations: COUNT() AS or SUM() AS , etc.) will leave the field named as it is in the table, making the addition of multiple fields with the same name from different tables impossible.
Example:
| dbquery TEST "
SELECT DATE(ab.reportdate) AS reportdate, ab.name AS device_A, cd.name AS device_B, cd.deviceid,
FROM testing
JOIN application.devicetype as cd ON ab.deviceid = cd.deviceid
....;"
In this example, the field ab.name will show up in the results as name not under the new name device_A and cd.name won't show up at all as the 'name' column already exists.
Question:
How do you get dbquery to recognize applied field names in a SELECT statement where there is not a transform command like COUNT or SUM?
... View more