Skip to content
Advertisement

Tag: sqlite

Splitting strings in SQLite

Does anyone know how to split my address columns. I would like to divide it into three new columns, seperated by it’s commas. For example 1808 FOX CHASE DR, GOODLETTSVILLE, TN is divided into 1808 FOX CHASE DR GOODLETTSVILLE TN So far I’ve tried Although I cannot create the third column with the state abbreviation. Thanks for any input Answer

Use of ORDER BY returns column filled with NULL

I have to do the following exercise: Write a SQL query to list the names of all people who starred in a movie released in 2004, ordered by birth year. Your query should output a table with a single column for the name of each person. People with the same birth year may be listed in any order. No need

SQLite query to find datetime difference between multiple rows

Here are my two tables’ structures in SQLite if startJob is 1 it implies that the employee is starting the job and if startJob is 0 it means employee is stopping the job. attendanceTable is sorted by mydate column I want output as worked hour by individual employees. Input of query can be two different dates e.g. 2021-08-20 and 2021-08-22

Why doesn’t SQLite appear to lock my table / row?

I’m tinkering with an in-memory sqlite database, trying to wrap my head around concurrency. Here’s an example using SQLAlchemy OUTPUT Here, I use two connections to write data to the same record. I would expect the output to be “A112”, because I thought the first connection would have a lock on the record until it COMMITs, but to my surprise

Don’t save info in table

I am trying to save the information to the database in the following way: But I get the following error: Using next data: UPD: Check for data and types, get next UPD2: If I use next code, it’s work: But I want to change table Answer Issue resolved, it works:

Advertisement