Questions tagged [sqlite]
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
92,082
questions
0
votes
0
answers
39
views
How Can I Fetch the task from my "task_list table" which having deadline today in mysqlite?
Here is the task_list table query :
CREATE TABLE "task_list" (
"task_id" INTEGER NOT NULL,
"task_code" TEXT NOT NULL,
"title" TEXT NOT NULL,
"description&...
0
votes
0
answers
20
views
Way to Filter by DB Field in Django using Class Views
I tried to search for answers, but after a few days, I'm here asking:
I'm a beginner, making a todo list app - expanding on a tutorial I followed. Currently, it's filtering by user, which is fine, but ...
0
votes
0
answers
11
views
Flask Migrate - IndexError on migration
I'm using Flask Migrate with SQLite3. I have the following upgrade script:
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e0b1170b3c02'
...
1
vote
1
answer
30
views
Why isn't it possible to remove characters from the middle of a file in place?
Say I have a file with a few lines of text in it:
a
b
c
d
e
and I want to remove the b character, but without rewriting the whole file. As far as I can tell, this isn't possible. Why?
I'm trying to ...
-1
votes
1
answer
37
views
float data type python and sqlit3
I have 20 million rows of data in maybe 40 sqlite3 databases. they are all the same: unix time stamp and several columns of numbers. the numbers are all type [float]. (the time stamp is [str])
The ...
0
votes
1
answer
20
views
Python - Pandas read_sql_query automatically rounds after 6 Digits
I'm trying to read data from sqlite3 database into a Dataframe. The problem is, that my numbers in the DB look like following 21.639929701230166. And if I print my df the number gets rounded to 21....
-1
votes
2
answers
20
views
when i try to run this code in dbeaver it give me this error " [SQLITE_ERROR] SQL error or missing database (near "fk_GRADES_ID": syntax error)"
CREATE TABLE School (
ID INTEGER PRIMARY KEY ,
Name TEXT NOT NULL
);
CREATE TABLE events (
ID INTEGER PRIMARY KEY ,
details TEXT NOT NULL,
start_data TEXT NOT NULL,
end_data TEXT NOT NULL,
title TEXT ...
0
votes
0
answers
8
views
Is there a way to make a .sqliterc that works only in my working directory?
I'd like to have some custom sqlite configurations for my project. I don't want to interfere with the global ~/.sqliterc file.
Is there a way to make a sqlite config file that works only for the ...
-1
votes
0
answers
22
views
TypeError: 'Button' object is not callable
I am trying to insert data into sqlite3 DB. But I am getting a strange error.
So this is how I am getting user input:
def expense():
new_window =Toplevel()
new_window.geometry("400x400") #...
1
vote
1
answer
24
views
Cumulative sum with condition in SQLite
I have a dataset that looks like the one below and I need to know which songs were played in sequence the most (I am using SQLite).
SELECT endtime, trackname FROM streaming_history AS sh
JOIN albums ...
-1
votes
1
answer
32
views
Sqlite analyze big table
i have tables in sqlite size of 649876358 line. I need get all lines with repetitive value in column and write every group in another file but sqlite working very slowing (after 10 minutes not one ...
0
votes
0
answers
15
views
How to remove all rows that DON'T contain a specific string, which are spread over multiple columns
Using an SQLite query, I'm trying to remove all rows that DON'T contain a specified string. This string could be spread throughout multiple columns.
Example:
As visualised in the image below, I want ...
0
votes
0
answers
19
views
Safely writing to SQLite from multiple processes, do I have to consider locks
I have a SQLite database that I want to access from multiple processes, using SQLAlchemy. I am aware that SQLite uses locking to ensure data integrity, and that in principle a write can fail if ...
0
votes
0
answers
17
views
Flutter Implement a Favorites feature using SQLITE LISTVIEW
I need help I am developing an app using SQLite, here is my scenario I want to make favorite feature using SQLLITE, if the value does exist then fill the heart icon with red color otherwise remove the ...
-1
votes
0
answers
33
views
How to apply algorithms in query systems to optimize queries [closed]
I am working on the backend of a query system, and now I have completed the implementation of the backend interface.
The general implementation process of each interface is to judge the conditions in ...
-1
votes
1
answer
27
views
Sqlite create table with check constraint
I am adding check constraint in sqlite android using create table query but Getting error like this
android.database.sqlite.SQLiteException: no such column: bloodgrp (code 1): ,
String query = &...
-3
votes
1
answer
26
views
How to get data from table A based on table B data
i have two tables A and B
Table A
Table B
I want to get all songs data which is matched to genre_id=1 from Table A, is there any query for that
0
votes
0
answers
42
views
json_set returns desired result (in SQLITE Browser) but does not update the table
This is my table:
CREATE TABLE orders(
id integer primary key,
order_uid text unique,
created_at text,
updated_at text,
...
0
votes
0
answers
40
views
How to add data from database to text widgets?
I'm trying to create a database of references through SQlite3 and retrieve author, title, etc. to return each to the text widget when I click on a reference from the listbox. I don't know what is the ...
-2
votes
0
answers
18
views
how to fix it table tasks has no column named date (code 1 SQLITE_ERROR)
enter image description here _addTaskToDb() async { int value = await _taskController.addTask( task: Task( note: _noteController.text, title: _titleController.text, date: DateFormat.yMd().format(...
-1
votes
0
answers
31
views
Wierd behaviour in django
I am using SQLite in my Django project, I am gathering the data into the database manually with python. everything worked fine in that phase, now when I am trying to reach them in the templates file, ...
-1
votes
2
answers
56
views
Incorrect number of bindings supplied -error
I end up always with "Incorrect number of bindings supplied" error of SQlite3. I tried (dataset), (dataset,),[dataset].
import requests
import json
import datetime
import sqlite3
#Get tbe ...
-1
votes
0
answers
20
views
Database structure for big warehouse with different sites
Good day! I'm stuggling to understand sqlite3 and mysql perfomance..
For now, i have sqlite3 database to store 25 different storage sites and items on this sites. Current database designed in one ...
0
votes
0
answers
18
views
Ionic Capacitor: Open SQLite file using file chooser
I'm working on an Ionic Capacitor app and would like to implement the following feature:
user presses a button
a file chooser opens
user can select an SQLite database file
the app accesses the file ...
0
votes
1
answer
17
views
Chain Commands in Sqlite: .print dot-command not Working
I can chain commands in sqlite like:
$ sqlite3 test.sqlite .tables .schema "select * from object_store"
However, when I try to use .print dot-command, it gives error.
$ sqlite3 test.sqlite ....
0
votes
0
answers
21
views
python sqlite3 avoid "database is locked" for multiple processes writing to same db
I have written a script that executes inside docker and writes to an sqlite3 db on host. At a time, there are 8-10 such docker containers writing to the same database (each having their own connection)...
-1
votes
0
answers
40
views
SQLite losing data
I'm dealing with a problem where a row in my table from a SQLite db just dissapears, i made my aplication print the exact query that runs and have executed all of them in the same order on the db and ...
0
votes
0
answers
7
views
Recovering Lost Firefox Bookmarks by Reattaching rows from moz_places to moz_bookmarks in places.sqlite
All my bookmarks got deleted and I didn't have a backup file. They are gone from the moz_bookmarks table and moz_bookmarks_deleted is empty in the places.sqlite file, but they are still in moz_places. ...
1
vote
2
answers
40
views
Conditionally insert and return rowid or 0?
I know how to do this using a transaction but I was wondering if I can do this in a single line. My actual query is more complex but the part I can't figure out is how to get the rowid or 0 without ...
1
vote
1
answer
27
views
Cursor should only select cells with a different value
I want, that my cursor is moving to the next cell with different content and I want the cursor to skip over all cells that have a value that already existed.
For example we have the column: Beer, Car, ...
0
votes
0
answers
22
views
Why android can't open sqlite db from external storage on android 30 upwards
I'm updating the target sdk version on an android app and in the process, I picked up the sqlite db importer is broken. Previously on android version >= 29, the importer worked fine.
So Basically, ...
-3
votes
1
answer
34
views
How to make a send command
I am making a discord bot and adding economy to it. I alredy made a wallet and balance system using SQLite. I want to make a send command, but when i do
.send it gives me an error:
if amount / 100 ...
-2
votes
1
answer
20
views
RowIDs on SQLite3 sort wrong in Python while getting
I am trying to get rowIDs with ages together, but i've seen that rowIds sorted wrong. They start from 6 and goes 6 times more of the last rowId. I think it's an interestig mistake. Weird!
import ...
0
votes
1
answer
28
views
How to import and manage conflicts an excel file into room sqlite database?
I want to import an excel file into my database designed with room library on android.
I can export the database using a library but for import i need to check items and handle conflicts but I don't ...
-1
votes
1
answer
34
views
Null-safe equals comparison
SQLite 3.27:
Is there a way to write an expression where comparing a null to a null would evaluate to true?
For example:
with data (a,b) as (
values
(1,1),
(1,null),
(null,null)
)
select
*
from
...
-5
votes
0
answers
33
views
System.Data.SQLite.SQLiteException:'SQL logic near "." : syntax error' [closed]
I have tried the below code I can't figure out what's wrong
string connstring = "Data Source=AnyStore.db;Version=3;New=True;Compress=True;";
SQLiteConnection conn = new SQLiteConnection(...
-1
votes
0
answers
15
views
want to call sqlite data only for the created file
friends, I am creating a mobile application to hire house cleaners for a project I have set the bill to auto-generated and I have added two User types, User and contractor
when I code auto-generate ...
0
votes
0
answers
39
views
'NoneType' object is not subscriptable. Type error
async def balance(ctx):
author = ctx.message.author
cursor.execute(f"SELECT id FROM users where id={author.id}")
time.sleep(3)
if cursor.fetchone()==None:
cursor....
0
votes
0
answers
23
views
Sqlite3 .get() function is not working, it says name is not defined. It is throwing an error at line 40 {earn.get()}','{earning_value.get()}
from curses import window
from tkinter import *
from tkinter import ttk
import sqlite3
#connect to database
conn = sqlite3.connect("track.db")
c = conn.cursor() #create a cursor.
#table
c....
2
votes
1
answer
22
views
How to exclude 'queryset' characters when using django sqlite orm
I want to send mail to many users using django sendmail.
I am using orm in sqlite3 to get the list of recipients stored in db.
However, the orm result includes 'queryset', so mail cannot be sent
Is ...
-1
votes
2
answers
41
views
Approach to storing forecast time series data using python
So I want to scrape a weather forecast table once a day and store my results for future analysis. I want to store the data but im not sure how to.
Example of the data: Forecast Table
My four variables ...
-1
votes
0
answers
39
views
Problem to update multiple rows with python
Hello how are you ? I write because I have again problems to edit values from my code, it constantly tells me:Incorrect number of bindings supplied
what can be the error?
I know that I also executed ...
-1
votes
0
answers
19
views
Python-sqlite How can i take a value from textbox without button or press enter? [closed]
I want to take a value (comes from rfid reader) from textbox (actually data will come rfid reader but if I want to add this value to database, I thought I have to put a textbox for fill) without ...
-4
votes
0
answers
36
views
DATA ANALYSIS learn? (SQL) Structured Query Language [closed]
Which is better ( MySql or MS sql server or postgresql or sqlite) for data analysis?
-2
votes
0
answers
34
views
Adding SQLite.db file from the assets
Hi guys I am a beginner programmer. I want to extract data from an external sqlite database file according to a given condition. So far I have created a small sparse test database. My data fields are ...
-2
votes
1
answer
57
views
How do I insert into two tables at once and have them refer to each other?
When I execute this code, I get an exception because the reference failed. Thread and Post have a reference to each other and I could have sworn I use to do something like this and it was allowed as ...
-2
votes
1
answer
57
views
Get daily stock portfolio from incomplete transaction time series in SQLite
I'm trying to come up with an SQL solution for the following problem. I have a table in which stock transactions are saved. As transactions don't occur on a daily basis the time series in the table is ...
2
votes
0
answers
32
views
SQLite - Count of reports per team per month
I have a SQLite database full of reports. I was previously exporting the results to an Excel doc and had pivot tables created to visualize the results, but now I'm hoping to use a tool like Grafana to ...
-1
votes
0
answers
32
views
Efficiently store/retrieve images in QSqlTableModel (SQLite) for use as icon (Qt.DecorationRole) in QListView
Is there an efficient way to store/retrieve image data from a QSqlTableModel for use as a decoration icon?
Currently, I have a QSqlTableModel that uses SQLite. The table of this model has a BLOB ...
2
votes
1
answer
32
views
SQLite: UNNEST an integer array represented as a BLOB
SQLite doesn’t have native support for arrays. I would think that my method (thinking outlined below) of making a custom BLOB encoding would be a fairly common workaround (yes, I need an array rather ...