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

Commit 79b6c89

Browse files
author
Sergey Vasilyev
committed
Cast to unlimited varchars in MS SQL (especially UUDS)
1 parent be24cb2 commit 79b6c89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data_diff/databases/mssql.py

Lines changed: 2 additions & 1 deletion
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)