You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this message finds you well. I am reaching out to inquire about the estimated timeline for resolving the issue outlined in the following link: #394
This issue appears to have been introduced in versions after 1.3, as it was not present in that version.
Currently, we are using the following setup:
Python: 3.12
Django: 4.2.16
mssql-django: 1.3
pyodbc: 5.1.0
Due to the complexity of our database schema, which includes composite primary keys and high complexity, we use raw queries without relying on Django's ORM.
Below is an example of one of our queries:
(This query is obfuscated and edited, so it may not work as-is. However, it represents the structure and logic of the type of query we are using.)
DECLARE @A1 INT = %s,
@A2 VARCHAR(100) = %s,
@A3 VARCHAR(100) = %s,
@A4 INT = %s;
WITH C1 AS (
SELECT A, B, C,
STRING_AGG(D, ', ') AS E
FROM (
SELECT A, B, C, D
FROM T1
WHERE A = @A1
AND @A2 = @A2
) AS C1
GROUP BY A, B, C
),
C2 AS (
SELECT A, B, C, COUNT(*) AS F
FROM T2
WHERE A = @A1
AND G = 'a'
GROUP BY A, B, C
),
C4 AS (
SELECT a.A
, a.B
, a.Z
, CASE WHEN b.AA = 'a' THEN 1
WHEN b.AA = 'b' THEN 5
WHEN ISNULL(b.AA, '') = '' AND c.AB LIKE '%%someword1' THEN 2
WHEN ISNULL(b.AA, '') = '' AND c.AB LIKE '%%someword2' THEN 3
ELSE 4 END AS AC
FROM T3 a
LEFT JOIN T4 b
ON b.AD = 'a'
AND b.AE = 'b'
AND a.B = b.AF
WHERE a.A = @A1
AND a.AH = @A2
)
SELECT a.*
, b.E AS AJ
FROM C4 a
LEFT JOIN C1 b
ON a.A = b.A
AND a.B = b.B
AND a.C = b.C
ORDER BY AC, B, C;
In version 1.3, the query executes correctly, including LIKE '%%someword1' and LIKE '%%someword2'. However, in version 1.5, an error occurs:
('Replacement index 4 out of range for positional args tuple',)
This indicates an issue with escape handling for %% in the LIKE clause.
Could you please provide any updates or an estimated timeline for resolving this issue? Your assistance is greatly appreciated.
Thank you for your hard work on this project, and I look forward to your response.
Question
I hope this message finds you well. I am reaching out to inquire about the estimated timeline for resolving the issue outlined in the following link:
#394
This issue appears to have been introduced in versions after 1.3, as it was not present in that version.
Currently, we are using the following setup:
Python: 3.12
Django: 4.2.16
mssql-django: 1.3
pyodbc: 5.1.0
Due to the complexity of our database schema, which includes composite primary keys and high complexity, we use raw queries without relying on Django's ORM.
Below is an example of one of our queries:
(This query is obfuscated and edited, so it may not work as-is. However, it represents the structure and logic of the type of query we are using.)
In version 1.3, the query executes correctly, including LIKE '%%someword1' and LIKE '%%someword2'. However, in version 1.5, an error occurs:
('Replacement index 4 out of range for positional args tuple',)
This indicates an issue with escape handling for %% in the LIKE clause.
Could you please provide any updates or an estimated timeline for resolving this issue? Your assistance is greatly appreciated.
Thank you for your hard work on this project, and I look forward to your response.
Best regards,
Relevant Issues and Pull Requests
ISSUES : #394
The text was updated successfully, but these errors were encountered: