Pārlūkot izejas kodu

db.exe Fehler in source_table behoben

gc-server6 1 gadu atpakaļ
vecāks
revīzija
9f43e39d38
2 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      database/db_create.py
  2. BIN
      dist/db.exe

+ 3 - 1
database/db_create.py

@@ -191,7 +191,9 @@ def create(config_file="dbtools/OPTIMA.json"):
                         prefix, cfg.filter[0], cfg.filter[1]
                     )
                 elif "." in source_table or cfg.source_dsn["schema"] == "":
-                    select_query = f'SELECT T1.* FROM \\"{source_table}\\" T1 '
+                    if source_table[0] != "[":
+                        source_table = f"[{source_table}]"
+                    select_query = f"SELECT T1.* FROM {source_table} T1 "
                 else:
                     select_query = f"SELECT T1.* FROM [{cfg.source_dsn['schema']}].[{source_table}] T1 "
 

BIN
dist/db.exe