Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 0978570

Browse files
authored
Merge pull request #825 from datafold/fix-varchar-result-space
Cast to unlimited varchars in MS SQL (especially UUDS)
2 parents be24cb2 + 79b6c89 commit 0978570

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data_diff/databases/mssql.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def current_schema(self) -> str:
9494
WHERE name = CURRENT_USER"""
9595

9696
def to_string(self, s: str):
97-
return f"CONVERT(varchar, {s})"
97+
# Both convert(varchar(max), …) and convert(text, …) do work.
98+
return f"CONVERT(VARCHAR(MAX), {s})"
9899

99100
def type_repr(self, t) -> str:
100101
try:

0 commit comments

Comments
 (0)