Giter Club home page Giter Club logo

Comments (5)

mShan0 avatar mShan0 commented on July 17, 2024

Thanks for the report. If you manage to get some repro steps, that would be great.

from mssql-django.

ElRoberto538 avatar ElRoberto538 commented on July 17, 2024

I have the same issue, running MyModel.objects.raw("some sql with a LIKE here") returns different results when run in the ORM vs when I run it in SQL Server Management Studio. I'm trying to make a demo, but when I dumb the query down a bit it works properly.

For reference, our original query with the issue has CTE's, subqueries etc, with the problematic "LIKE" being in an outer apply.

from mssql-django.

mdelcambre avatar mdelcambre commented on July 17, 2024

My initial attempts to recreate with simple LIKEs with CTEs have not resulted in reproducing this bug. So unsurprisingly seems like a more subtle bug.

from mssql-django.

ElRoberto538 avatar ElRoberto538 commented on July 17, 2024

So we worked out the issue on our end, when we updated to 1.5, one of our raw queries had LIKE '%machine%' with the new update the % symbols broke it, so it got changed to LIKE '%s' and the word 'machine' passed in as a parameter. However the single quotes were left there wrapping the %s... Which somehow ran, but produced the wrong results. When I was trying to make an example I was correctly not wrapping the %s in single quotes and so it worked.

from mssql-django.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.