Skip to content

Commit

Permalink
Use specific column references in order by
Browse files Browse the repository at this point in the history
  • Loading branch information
clrcrl committed Jun 3, 2021
1 parent 18b2dc3 commit d30b509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/compare_relation_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ select
coalesce(a_cols.data_type = b_cols.data_type, false) as has_data_type_match
from a_cols
full outer join b_cols using (column_name)
order by coalesce(a_ordinal_position, b_ordinal_position)
order by coalesce(a_cols.ordinal_position, b_cols.ordinal_position)

{% endmacro %}

Expand Down

0 comments on commit d30b509

Please sign in to comment.