110 questions
1
vote
1
answer
67
views
REGEXP in SQLite - problem while editing table
I started learning SqLite and encountered a problem with regular expressions. I use DB Browser. A table is created, the table has two fields: email and address. When writing the line "address&...
0
votes
0
answers
93
views
Open DB browser For SQLCipher by command line
We use SQLite and, more recently, the encrypted version with SQLCipher.
It works well with our software, but I'm having a small problem using DB Browser for SQLCipher. This software works well, but it ...
0
votes
1
answer
626
views
DB Browser for SQLite
I have installed DB Browser for SQLite on my mac. I need to create a SQLITE database or use an existing database and create a table in the database called "Ages":
CREATE TABLE Ages (
...
-1
votes
1
answer
54
views
Combining SELECT with SELECT DISTINCT in DBBrowser SQLite
I've got a query to select distinct results with two tables which returns email addresses that don't occur in table2, but I'm having trouble also selecting data from the Table 2.First in this query ...
0
votes
1
answer
54
views
Copy only the selected values form one table to another one with where clause in SQLite
I have a table with duplicated rows (table: electricity_meters). And there is another table (table: power_consumptions) that tells me which row of the first table to keep.
Trying delete the duplicated ...
0
votes
2
answers
80
views
How to control the frequency of sensors values being recorded in db browser SQLite?
I'm recording values of multiple mobile sensors in kotlin and storing them in DB Browser SQLite database. The problem I'm facing is that I'm getting too much values getting stored in database aprox ...
0
votes
1
answer
177
views
Extracting text in string using DB browser (SQLite)
I want to extract the \\xxxxxxx04\xxx and \\yyyy03\yyyyyyy from these samples:
\\\\xxxxxxx04\xxx\05. ***\*** **\*****\*****\****.pdf
\\\\yyyy03\yyyyyyy\***\*** **\*****\*****\****.html
There are ...
1
vote
0
answers
26
views
Adding a foreign key is not working in db browser for sqlite [duplicate]
ALTER TABLE employee ADD FOREIGN KEY(branch_id) REFERENCES branch(branch_id) ON DELETE SET NULL;
gives me following error message:
near "FOREIGN": syntax error
in line 12:
ALTER TABLE ...
0
votes
0
answers
250
views
Setting DB Browser (SQLite) application as a default app for opening .sqlite files for all users
I need to set DB Browser application as a default app for .sqlite files for all users.
I tried to set applicationn in windows settings for .sqlite files but it was set only for me.
Also I tried to ...
-5
votes
1
answer
271
views
How to get the day of the week from a date in mm/dd/yyyy format? [duplicate]
I am using DB Broswer for SQLite. I would like to retrieve information about the month and the day of the week for each sample.
SELECT Date
FROM Xtrain
returns
Date
26/04/2018
2/4/2018
I have tried ...
0
votes
0
answers
114
views
python saying table does no exist but the table is in DB browser
I am trying to make a search application connecting 4 databases but when I enter something in the input field. The application breaks
When I debug the application, it says 'MemberDetails' table does ...
-2
votes
2
answers
461
views
Can't import northwind sql file onto DB Browser for SQLite
I seem to get this error message.
[Error importing data: Error in statement #1: near "S":syntax error. Aborting execution and rolling back.]
(https://i.sstatic.net/IzRvb.png)
I looked into ...
0
votes
1
answer
255
views
Update year only in column timestamp date field SQLITE
I want to update the year only to 2025 without changing the month day and time
what I have
2027-01-01 09:30:00
2012-03-06 12:00:00
2014-01-01 17:24:00
2020-07-03 04:30:00
2020-01-01 05:50:00
2021-09-...
1
vote
1
answer
203
views
Choose encoding when converting to Sqlite database
I am converting Mbox files to Sqlite db. I do not arrive to encode the db file into utf-8.
The Python console displays the following message when converting to db:
Error binding parameter 1 - probably ...
0
votes
1
answer
162
views
SQL LIKE + wildcard operator only returns results with first value
What's happening StackOverflow.
I'm using DB Browser for SQLLite to query a database with two tables - people and states. people has the field state_code and states has the fields state_abbrev and ...
-2
votes
1
answer
174
views
SQLite different execution time for same result
I've got a database with movies, and I wanted to extract every person, who starred in movies from the year 2004, ordered by birth. I've tried different querys which are doing the same, but the first ...
0
votes
0
answers
297
views
How to add images to DB Browser for sqlite that are stored in drawable folder?
I am trying to pre-populate a room database with some data using DB Browser for sqlite.
I have a table defined with (name: String, score:Int, image:Int). That image field stores an image from drawable ...
1
vote
1
answer
511
views
How to insert a row into a table with a composite foreign key referencing a composite primary key
I have a table called BB:
CREATE TABLE BB (
SID INTEGER PRIMARY KEY,
FName TEXT,
LName TEXT
);
And a table called QR that contains a composite foreign key referencing the FName and LName ...
0
votes
1
answer
688
views
SQLITE_BUSY The database file is locked
I'm getting the error [SQLITE_BUSY] The database file is locked (database is locked), even though I close my connection and the statements. Not sure what else to try.
public void getTeams() throws ...
0
votes
1
answer
248
views
How to split these records into individual new ones?
I want to search if a string exists in column2 (site_id) then put that string in a new table with the value of its before column in that row. The table has only 2 columns and the site_id column may ...
0
votes
1
answer
512
views
Opening a c# sqlite-net-sqlcypher database in a SQLite manager and vice versa
Situation : Windows 11 - Latest updates; .NET 6 console app - latest updates; sqlite-net-sqlcypher nuget package (1.8.116) - also latest version; Both Visual Studio (2019 and 2022) and Rider - All ...
1
vote
1
answer
26
views
How to write the exact text next to the text and replace certain letters in it? SQLite
I am creating a phonetic dictionary for American English. Here are some examples:
vocabulary phonetic_transcription
dream dɹim
drain dɹeɪn
drink dɹɪŋk
adrenaline ...
1
vote
0
answers
612
views
Problem with dump command using DB Browser for SQLite
I am relatively new to SQlite3. I am currently using DB Browser. I have two very large .db files that I want to combine such that a all the tables (all different) all reside together in one .db (ie- I ...
1
vote
1
answer
3k
views
SQL Query to convert unixepoch time in nanoseconds to human readable time
I have a timestamp in epoch time with nanoseconds, like this: 1634713905326784000
I am using DB Browser for SQLite to convert this into a timestamp, like this:
STRFTIME('%Y-%m-%d %H:%M:%f', timestamp/...
0
votes
0
answers
248
views
How can I calculate the Gini coefficient per state (external source as example)?
I am busy messing around in SQLite and want to calculate the Gini coefficient per US states based on median income per capita and the populations per county.
The process is explained here: https://...
0
votes
0
answers
612
views
How do I output a list of columns from a row value?
I want to query and output a count of countries where residents of each country last travelled to. I have the following query:
SELECT
COUNTRY, SUM(COUNTRY_OF_LAST_TRAVEL = 'USA') AS USA
FROM ...
2
votes
1
answer
575
views
How to push data to DBHub.io in Python
I was wondering if there was a way to connect to my sqlite DB in Python and push that data to the cloud in DBHub.io.
The reason for this is that I already have my DB in DBBrowser locally and now I ...
0
votes
1
answer
170
views
Different output between DISTINCT SQL statement and DISTINCT method from pyspark
I'm making some cleanings in a +11M rows dataset that contains entreprises names with so much noise. I want to make some regex cleanings (deleting punctuation, whitespaces, digits, accents and some ...
0
votes
0
answers
35
views
No such column error when replacing comma in integer field for percentage calculation
I'm having trouble calculating a percentage from integer columns in two tables in SQLite. My employeetrained and employeetotal data are both integers, but one has commas. I'm using REPLACE to take ...
0
votes
1
answer
683
views
DB. Browser.Sqlite.OperationalError: database is locked
I am trying to submit a form into DB Browser Sqlite. I've created a table. I am able to store the data into Sqlite. However, once I add in a function to execute a cofirmation popup box in submit ...
0
votes
0
answers
120
views
No Such Column in SQLite Temporary Table Statement
I have two SQLite tables (companies and complaints) I'm using to calculate a ratio of HR complaints to employees, but when attempting to run the query below in DB Browser, I'm getting this error:
-- ...
0
votes
3
answers
2k
views
Change duplicate value in a column
Can you please tell me what SQL query can I use to change duplicates in one column of my table?
I found these duplicates:
SELECT Model, count(*) FROM Devices GROUP BY model HAVING count(*) > 1;
I ...
1
vote
1
answer
771
views
Need help for Python and SQLite --> TypeError: 'NoneType' object is not subscriptable
I need your help in order to solve this problem.
I am trying to enter a line in a database where the program has to find a material X in the database and then get the quantity value. After that, the ...
-1
votes
1
answer
64
views
Why DB Browser have an order I can't replicate?
I have an issue I really don't understand. In fact, I have a database of movies where there's a table for actors,containing two colums (movie id and name).
For example, then I enter the movie id of ...
0
votes
0
answers
77
views
Python & db browser : cannot insert data from a table in another one
I have a little project and I don't understand how to resolve it.
I want to create a pc builder for a school project with Tkinter and SQLite 3 (that's the rules). But I have a huge issue : When i ...
-1
votes
1
answer
24
views
how to get specific records from two tables
I have 2 tables, table one contains phone numbers and owner name, and table two have phone , name and also its have city and street. the problem in table two is that the owner name is the name of the ...
0
votes
1
answer
1k
views
how to export queried result from db browser sqlite to google drive
i have a table with over six millions rows and i want to query them and save the result as a google sheet document but I don't know how.
as well I would like to know how to save the result as a new ...
1
vote
1
answer
3k
views
What causes a foreign key mismatch error in sqlite database
this is my student_table create query
CREATE TABLE "student_table" (
"student_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT NOT NULL,
"...
3
votes
4
answers
139
views
Why are no rows returned in my app, whereas the same query returns rows in DBBrowser?
With this simple query against my SQLite database:
SELECT MovieTitle, MPAARating, IMDBRating, DurationInMinutes, YearReleased, genres, actors, directors, screenwriters
FROM MOVIES_SINGLETABLE
WHERE ...
4
votes
3
answers
14k
views
How to open a database encrypted with SQLCipher?
I created and encrypted a database with the package.(react-native-sqlcipher) I want to open this database with "DB Browser for SQLite" or "SQLite Studio". However, it doesn't open ...
0
votes
1
answer
893
views
Why I can't find my database file in C: disc from DB Browser
I made database file called doctors.db in path given in following picture. I played with it in Command Prompt and it works perfect!
Now when I try to find it with program DB Browser for sqlite, you ...
0
votes
0
answers
2k
views
SQLite DB Browser, can't modify column because trigger
I want to add a column to a table with DB Browser but when I try to save, I get this error message:
Modifying this column failes. Error returned from database: Error
renaming table '...
2
votes
1
answer
2k
views
Trying to add a CHECK constraint using DB Browser for SQLite
Using DB Browser for SQLite I am trying to add a check constraint on a numeric field. In the Edit Table Definition screen, I can add and name the constraint, but I'm unable to add the check ...
0
votes
3
answers
50
views
Time overlaps from Nesting queries
Based on the current schema I have been asked to find
-- people who were untested and exposed to some one infectious
-- Do not list anyone twice and do not list known sick people
-- Exposed = at the ...
2
votes
3
answers
74
views
Nesting queries
My query from the attached schema is asking me to look for the same location of where the people who tested positive went and were in the same people as the untested people. (Untested means the people ...
-1
votes
1
answer
32
views
Mutiple PK's in where clause
In my table I have (LocID) which is my PK and I am trying to narrow it down to specific 4, however when I run the query below I get only one answer. What needs to be fixed in this query?
-- second we ...
0
votes
2
answers
379
views
Timestamps and addition of weeks
My query requires me to find the number of people positive and their infectious periods which is plus and minus 2 weeks. In my query below I keep getting null in my 2 weeks Timestamp
select PersonID, ...
0
votes
2
answers
179
views
Ambiguous Columns and Count
My query requires me to find the busiest location by number of people (Schema Attached)
select DISTINCT location.name as 'Location', f_name|| ' ' || l_name as 'Citizen'
from CheckIn
join location on ...
-1
votes
2
answers
43
views
What sql formula am I missing?
I need to find out the busiest location by check in for a query.
select name
from checkin join location on checkin.locid = location.LocID
order by name
This query gives me the result but I cannot ...
0
votes
0
answers
112
views
(sqlite) How to share the same Primary Key across four tables
I'm really new to setting relationships between tables.
I created 4 tables and they're in a one-on-one relationship, so I want to make these tables share the PK.
I'm using db browser for sqlite.
...