File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 179
179
CREATE OR ALTER PROCEDURE web .get_customers
180
180
AS
181
181
SET NOCOUNT ON ;
182
- -- Cast is needed to corretly inform pyodbc of output type is NVARCHAR(MAX)
183
- -- Needed if generated json is bigger then 4000 bytes and thus pyodbc trucates it
184
- -- https://stackoverflow.com/questions/49469301/pyodbc-truncates-the-response-of-a-sql-server-for-json-query
182
+ -- Cast is needed to simplify JSON management on the client side:
183
+ -- https://docs.microsoft.com/en-us/sql/relational-databases/json/use-for-json-output-in-sql-server-and-in-client-apps-sql-server
184
+ -- as a single JSON result can be returned as chunked into several rows. By casting it into a NVARCHAR(MAX) it will always be
185
+ -- returned as one row instead (but with a 2GB limit...which shouldn't be a problem.)
185
186
SELECT CAST ((
186
187
SELECT
187
188
[CustomerID],
You can’t perform that action at this time.
0 commit comments