Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table alias bug #1900

Closed
andy-wm-arthur opened this issue Jul 6, 2021 · 2 comments
Closed

table alias bug #1900

andy-wm-arthur opened this issue Jul 6, 2021 · 2 comments

Comments

@andy-wm-arthur
Copy link
Contributor

error running query: table "U0" does not have column "from_prefix_length"

SELECT `ipam_ipaddress`.`id`, `ipam_ipaddress`.`created`, `ipam_ipaddress`.`last_updated`, `ipam_ipaddress`.`_custom_field_data`, `ipam_ipaddress`.`status_id`, `ipam_ipaddress`.`host`, `ipam_ipaddress`.`broadcast`, `ipam_ipaddress`.`prefix_length`, `ipam_ipaddress`.`vrf_id`, `ipam_ipaddress`.`tenant_id`, `ipam_ipaddress`.`role`, `ipam_ipaddress`.`assigned_object_type_id`, `ipam_ipaddress`.`assigned_object_id`, `ipam_ipaddress`.`nat_inside_id`, `ipam_ipaddress`.`dns_name`, `ipam_ipaddress`.`description`, (SELECT JSON_OBJECT('root', 'to', 'to_commit', U0.`to_commit`, 'to_commit_date', U0.`to_commit_date`, 'from_commit', U0.`from_commit`, 'from_commit_date', U0.`from_commit_date`, 'diff_type', U0.`diff_type`, 'to_id', U0.`to_id`, 'from_id', U0.`from_id`, 'to_created', U0.`to_created`, 'from_created', U0.`from_created`, 'to_last_updated', U0.`to_last_updated`, 'from_last_updated', U0.`from_last_updated`, 'to_host', U0.`to_host`, 'from_host', U0.`from_host`, 'to_broadcast', U0.`to_broadcast`, 'from_broadcast', U0.`from_broadcast`, 'to_prefix_length', U0.`to_prefix_length`, 'from_prefix_length', U0.`from_prefix_length`, 'to_role', U0.`to_role`, 'from_role', U0.`from_role`, 'to_assigned_object_id', U0.`to_assigned_object_id`, 'from_assigned_object_id', U0.`from_assigned_object_id`, 'to_dns_name', U0.`to_dns_name`, 'from_dns_name', U0.`from_dns_name`, 'to_description', U0.`to_description`, 'from_description', U0.`from_description`) AS `obj` FROM `dolt_commit_diff_ipam_ipaddress` U0 WHERE (U0.`from_commit` = 'cmnp0ibcu14lp0sb4kphbt62ikek0q15' AND U0.`to_commit` = 'uar5chec7hf4jb8aa2o1i40lbsvcho93' AND U0.`to_id` = `ipam_ipaddress`.`id`)) AS `diff` FROM `ipam_ipaddress` WHERE `ipam_ipaddress`.`id` IN (SELECT U0.`to_id` FROM `dolt_commit_diff_ipam_ipaddress` U0 WHERE (U0.`from_commit` = 'cmnp0ibcu14lp0sb4kphbt62ikek0q15' AND U0.`to_commit` = 'uar5chec7hf4jb8aa2o1i40lbsvcho93')) ORDER BY `ipam_ipaddress`.`host` ASC, `ipam_ipaddress`.`prefix_length` ASC LIMIT 21
@andy-wm-arthur
Copy link
Contributor Author

@andy-wm-arthur
Copy link
Contributor Author

Not actually a table alias bug, the diff table was appending the column tag to "from_prefix_length"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant