I was able to fix this by adding self.dt_castDecimal = DT_Decimal().from_data to execsql.py after line 3490, with the code now looking as:
self.encoding = encoding or 'latin1' # Default on installation of SQL Server self.dt_castDecimal = DT_Decimal().from_data self.encode_commands = True self.paramstr = '?'
Thanks. The general solution is to specify that cast in the Database class; I will make that change.
Fixed in 1.73.3.
Thank you very much!
I'm trying to use the COPY QUERY metacommand to add the results from a query on the originating database (MariaDB) to the destination database (SQLServer). The query is correct, since I've been able to dump its content to stdout using execsql. However, turns out the destination database is using a field of type money (https://docs.microsoft.com/en-us/sql/t-sql/data-types/money-and-smallmoney-transact-sql?view=sql-server-ver15) which execsql seem to not understand, and so it fails when trying to map data to that type.