diff --git a/ibis/backends/mssql/__init__.py b/ibis/backends/mssql/__init__.py index d424d903179ea..3942fc251b219 100644 --- a/ibis/backends/mssql/__init__.py +++ b/ibis/backends/mssql/__init__.py @@ -682,7 +682,7 @@ def create_table( raw_table = sg.table(temp_name, catalog=catalog, db=db, quoted=False) target = sge.Schema( this=sg.table( - "#" * temp + temp_name, catalog=catalog, db=db, quoted=quoted + "#" * bool(temp) + temp_name, catalog=catalog, db=db, quoted=quoted ), expressions=schema.to_sqlglot(self.dialect), )