Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
33 views

Entity Framework save changes from different Task<T>

My application has two concurrent tasks: await _fileWatcherService.StartWatchingAsync(); var backgroundTask = Task.Run(() => ProcessQueueAsync(cancellationTokenSource.Token), ...
federico's user avatar
-3 votes
1 answer
55 views

How to match req.body with update query? [closed]

The contents of a POST req.body are dynamic (unchecked checkboxes are not sent). SQL update and insert queries are hard coded, albeit with placeholders. Either I have to pad the req.body to match my ...
Dinsdale Trelawney's user avatar
-3 votes
0 answers
123 views

Why doesn't the database work only for one table? [closed]

In this part of the code, It is supposed to show a form that is supposed to work as a registry form or an edit form. in the edit form, It shows the correct data from both tables the first time you ...
kia_far's user avatar
0 votes
0 answers
47 views

How do I generate rows of predefined values from a SELECT statement? [duplicate]

In SQLite I want to return a list that I type in myself (for further left join SQL commands): ABC DEF GHI Not existing in any table but manually entered strings (like how SELECT 'ABC' returns ABC, ...
Eric F's user avatar
  • 919
0 votes
1 answer
41 views

How do I combine rows from different tables in one view?

My database stores events from C++ structs of report information. All structs have common fields (id, timestamp) but also unique ones (application.name, user.name). I need data for one component from ...
drem1lin's user avatar
  • 365
0 votes
0 answers
42 views

Intermittent TABLE ALREADY EXISTS database error

In CakePHP 4.3.3 with SQLite I use a temporary table which I refresh by deleting and re-creating. Occasionally from the CREATE statement I get an error that the table already exists, despite that my ...
SMac's user avatar
  • 49
0 votes
1 answer
52 views

How do I combine multiple json_group_array for this query correctly?

My aggregate query with group_concat selects from one table, and if there are no results it selects from another: SELECT Col1, Col2, IFNULL( SELECT group_concat(SomeColumn) FROM ...
TheHvidsten's user avatar
  • 4,269
1 vote
0 answers
56 views

How to handle a set of enums in SQLModel?

I have a table named Fruit in my SQLite database where I want to save a list of enum values: class Colors(Enum): GREEN = "green" RED = "red" BLUE = "blue" ...
Lucien Chardon's user avatar
-1 votes
1 answer
57 views

Why does my CREATE TABLE statement return an "incomplete input" error?

The cursor returns an error. main.py: def initialize_database(): conn = sqlite3.connect('PostsData.db') cursor = conn.cursor() cursor.execute(''' CREATE TABLE IF NOT EXISTS posts ( ...
Botanis's user avatar
0 votes
1 answer
84 views

"ambiguous column name" error from AFTER INSERT trigger

In DBeaver version 23.3.4.202402060628 I have the following SQLite3 code (for a high speed injection moulded part and package tracking machine in a factory): -------------------------------------------...
skeetastax's user avatar
  • 1,434
0 votes
1 answer
31 views

CS50 PSet 7 Movies (9.sql )

Why this code doesn't work? It should output 19.325 rows. I only get 4 rows. Meanwhile, it worked well when I used JOIN SELECT DISTINCT name FROM people WHERE id IN ( SELECT person_id FROM ...
Mina Tadros's user avatar
2 votes
1 answer
47 views

Sqlite SELECT last_insert_rowid() as lastId returns 0

In a Ionic 7/Angular 18 project I need to save Ventas (sales) and the products belonging to that sale in an SQLite database so I save the venta and then the products. As I need the idventa to have the ...
Eduardo Renteria Blanco's user avatar
0 votes
2 answers
70 views

For each match select player identifiers of the home player/team

I have a table with match identifiers and corresponding player/team identifiers expressed as home_id. Each team tid consist of two players and each player has its own identifier pid. In table matches ...
HJA24's user avatar
  • 404
0 votes
0 answers
60 views

Why does my query slow down massively when combining two fast WHERE clauses?

My table in an SQLite database is separately indexed on all columns. These queries both execute in under 15ms: select id from MyTable where end > 1704067100000 (returns 1 record) select id from ...
evo_race's user avatar
0 votes
1 answer
31 views

How do I use JSON functions on a generated column?

My schema: CREATE TABLE my_table ( id INTEGER PRIMARY KEY, json_data TEXT ); The json_data column is of the format: [ {"key": "foo", "date": "2023-01-01&...
Acorn's user avatar
  • 50.2k

15 30 50 per page
1
2 3 4 5
939