[sqlite] 答复: Making data unique

2015-12-07 Thread Quan Yong Zhai
Create Table T(ID integer, datetime Integer, data integer, primary key(ID, datetime)) ???: Andrew Stewart : ?2015/?12/?7 23:01 ???: 'SQLite mailing list' ??: [sqlite] Making

[sqlite] Making data unique

2015-12-07 Thread Keith Medcalf
create table dataset ( id integer not null, timestamp integer not null, data integer not null, unique (id, timestamp) ); > -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of

[sqlite] Exporting

2015-12-07 Thread Thomas Morris
One thing that I am going to try to do is, download sqlite and then install in on a standalone laptop. I would then have to save the database to a disc and extract it onto the laptop. Not the most ideal situation, but hopefully it works. Thomas > On Dec 7, 2015, at 12:41 PM, danap at

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-07 Thread Patrick Donnelly
On Mon, Dec 7, 2015 at 5:31 PM, Igor Tandetnik wrote: > On 12/7/2015 5:05 PM, Patrick Donnelly wrote: >> >> No rows were inserted but there are several writes. This behavior >> seems to be caused by AUTOINCREMENT? > > > Could be creating sqlite_sequence table where there wasn't one before. I >

[sqlite] Dual WAL mode?

2015-12-07 Thread Mark Hamburg
I know I'm being pretty hand-wavy here since I don't know all of the details of the WAL implementation and I'm not fluent in the terminology, but it seems like checkpoint starvation shouldn't have to allow the WAL to grow without bound provided the individual read and write processes don't have

[sqlite] sqlite3_errmsg and wide char

2015-12-07 Thread Scott Robison
On Fri, Nov 27, 2015 at 1:13 PM, Simon Slavin wrote: > > On 27 Nov 2015, at 7:03pm, Igor Korot wrote: > > > But what about Linux/Mac? > > Can I use that function there? > > Code pages are a Microsoft thing. Macs just have ASCII and Unicode, with > easy-to-use system functions to convert

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-07 Thread Igor Tandetnik
On 12/7/2015 5:05 PM, Patrick Donnelly wrote: > No rows were inserted but there are several writes. This behavior > seems to be caused by AUTOINCREMENT? Could be creating sqlite_sequence table where there wasn't one before. I wonder if there are still writes on the second and subsequent no-op

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-07 Thread Patrick Donnelly
Update on this: On Mon, May 5, 2014 at 4:53 PM, Patrick Donnelly wrote: > Hi, > > I have an INSERT that looks like > > INSERT INTO T > SELECT ... > > which I'm running numerous times a second that generally does nothing > because the SELECT returns no rows. Unfortunately, I've found that >

[sqlite] Making data unique

2015-12-07 Thread Andrew Stewart
I don't want to overwrite. An error or rejecting the Insert will work. Thanks, Andrew -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Adam Devita Sent: Monday, December 07, 2015 7:14 AM To:

[sqlite] Exporting

2015-12-07 Thread Robert W.Mills (Phoenix)
Hi Gunter, Where would I get the CSV module from? regards, Robert On 07/12/15 08:26, Hick Gunter wrote: > You can always write a virtual table for exporting to whatever flavor of CSV > you like. Mine exports/imports strings/blobs containing nonprintable > characters in x'' notation. > >

[sqlite] Making data unique

2015-12-07 Thread Andrew Stewart
Hi, I have a table that consists of 3 elements: ID - integer Date/time - integer Data - integer A single ID can exist multiple times. A single Date/time can exist multiple times. An ID & Date/time combination is unique.

[sqlite] Exporting

2015-12-07 Thread da...@dandymadeproductions.com
> On 12/6/15, Thomas Morris wrote: > >> I recently took over a Java based application that has SQLite embedded >> and now I need to export the database into a CSV format. Reading >> online, I have found that using (dot)mode csv, or any (dot) command is >> not possible when SQLite is embedded,

[sqlite] Create table while a dbdatareader is open

2015-12-07 Thread Hick Gunter
In that case you would need to BEGIN IMMEDIATE or BEGIN EXCLUSIVE and perform all your actions within the same thread. -Urspr?ngliche Nachricht- Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Lars Fiedler

[sqlite] Making data unique

2015-12-07 Thread Adam Devita
When you are about to insert into the table and find that ID & Date/time are identical to another record, but the data is different, do you want to overwrite, or not? Do you want an error? Adam On Mon, Dec 7, 2015 at 10:01 AM, Andrew Stewart wrote: > Hi, > I have a table that

[sqlite] Create table while a dbdatareader is open

2015-12-07 Thread Hick Gunter
Maybe you are looking for the INSERT INTO ... SELECT or CREATE TABLE ... AS SELECT syntax? This would be one write transaction instead of two separate, incompatible transactions. -Urspr?ngliche Nachricht- Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces

[sqlite] Exporting

2015-12-07 Thread Hick Gunter
You can always write a virtual table for exporting to whatever flavor of CSV you like. Mine exports/imports strings/blobs containing nonprintable characters in x'' notation. Basically it implements: For export: CREATE VIRTUAL TABLE _csv_exp USING CSV (,); -> create a CSV table with the

[sqlite] Create table while a dbdatareader is open

2015-12-07 Thread Simon Slavin
On 6 Dec 2015, at 8:46pm, Lars Fiedler wrote: > Is it possible with certain settings to have a dbdatareader iterating through > rows, and at the same time create a new table? I've tried various settings - > read uncommitted, wal mode, shared cache. But it looks like the open reader > has a

[sqlite] Create table while a dbdatareader is open

2015-12-07 Thread Lars Fiedler
Thanks. Good to know about the "create table as" syntax, but I'm not selecting rows and just copying to another table. For each row in one sqlite table, the system under development may do may do many things down stream - send emails, query other databases, and create tables and insert into