Giter Site home page Giter Site logo

Comments (5)

doctomlug avatar doctomlug commented on July 23, 2024

This is the "test case" and it works as expected with or without new-line after the SET

CREATE table IF NOT EXISTS test (a,b,c);

INSERT INTO test (a,b,c) VALUES
  ('1a','2b','3c'),
  ('4a','5b','6x');

UPDATE test SET 
a = b WHERE c = '6x';

SELECT * FROM test;

from sqlitebrowser.

chrisjlocke avatar chrisjlocke commented on July 23, 2024

Can you reproduce it all the time in the same database?

image

I've created a minimal schema based on your query which runs without problems, albeit Win 10 rather then Win 11, but I can't see that being an issue.

from sqlitebrowser.

chrisjlocke avatar chrisjlocke commented on July 23, 2024

For the avoidance of doubt (as I do get the error if the last line is highlighted) nothing is highlighted, and you're pressing the [>] button (or pressing [F5])?

image

If you highlight the last line and press [>] then you get the error you mentioned.

This is as expected, as pressing the [>] button runs the highlighted SQL, which in the case of highlighting just the second line, is incorrect SQL.

from sqlitebrowser.

doctomlug avatar doctomlug commented on July 23, 2024

Thanks for the quick reaction.

The simple test I performed (see above) worked with the "test" table created in the same database file. During development I had to reconnect the DB often and reconnected to a freshly generated one (by batch process). I do not believe the database is the problem.

I am pretty sure, nothing was highlighted and I started the querry by clicking on the "execute line" toolbar or Shif-F5. Both cases had the same issue. I copied the querry from an external text edito into a fresh SQL tab to ensure no strange hidden chars are around. Same effect.

But I will check again as soon as I have access to my work computer after the weekend

(And yes, I am sure too that this is not a real bug but some other stupid issue)

from sqlitebrowser.

doctomlug avatar doctomlug commented on July 23, 2024
  • Reopen database on different PC (Win 10)
  • Copied query from this forum
  • Result with cursor at beginning of second line + click on "execute line"

image

  • Result with same cursor position but click on "execute SQL" (no other query than the visible one)

image

In both cases nothing highlighted. I expected "execute line" to run the entire query up to the next semicolon (like it is done in Beaver). I am not sure if "line" is meant to be just this line of text or this query.

Tested a select query
image

Click on "execute line" ran the complete query although the cursor is in the second line

Splitting it even further, cursor in line 6, makes no difference (as expected whitespace is ignored, query is expanded "backwards" to its start)
image

The behavior of the two cases is clearly different and is not as expected in the case at the top.
The parsing appears to be different.

What is intended by design?

from sqlitebrowser.

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.