We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8718b2b commit 8a6edf6Copy full SHA for 8a6edf6
1 file changed
datajoint/expression.py
@@ -634,10 +634,11 @@ def make_sql(self):
634
if not arg1.heading.secondary_attributes and not arg2.heading.secondary_attributes:
635
# no secondary attributes: use UNION DISTINCT
636
fields = arg1.primary_key
637
- return ("SELECT * FROM (({sql1}) UNION ({sql2})) as `_u%x`".format(
+ return ("SELECT * FROM (({sql1}) UNION ({sql2})) as `_u{alias}`".format(
638
sql1=arg1.make_sql() if isinstance(arg1, Union) else arg1.make_sql(fields),
639
sql2=arg2.make_sql() if isinstance(arg2, Union) else arg2.make_sql(fields),
640
- )) % next(self.__count)
+ alias=next(self.__count)
641
+ ))
642
# with secondary attributes, use union of left join with antijoin
643
fields = self.heading.names
644
sql1 = arg1.join(arg2, left=True).make_sql(fields)
0 commit comments