Re: [sqlite] checking if a table exists

2017-09-22 Thread mikeegg1
thon: cur.execute(, > values to bind>) >> cur.execute("select count(*) from sqlite_master where type = 'table' and >> name = ?;", (,)) >> >> >> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On

[sqlite] checking if a table exists

2017-09-22 Thread mikeegg1
I’m using the statement: select count(*) from sqlite_master where type = 'table' and name = ‘$NAME’; This statement works fine in the sqlite3 shell. This statement does not work in my API. Is there a PRAGMA I need to issue so I can check for table existence? TIA Mike PERL code to check for

Re: [sqlite] rowid changing....

2016-09-18 Thread mikeegg1
Thanks everyone. I was mis-equating REPLACE with UPDATE. I’ll change my code to “INSERT or IGNORE” and add an UPDATE. Mike > On Sep 18, 2016, at 05:34, Keith Medcalf wrote: > > > On Saturday, 17 September, 2016 21:35, mikeeggl asked: > >> In my DDL I have “integer

[sqlite] rowid changing....

2016-09-17 Thread mikeegg1
Happy Saturday. In my DDL I have “integer primary key not null” on my tables. When I do the first insert to these tables the rowid is assigned. The insert statement is a “insert or replace into…” so I don’t have to deal with insertion errors. However, I expected the rowid to not change when

Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
I forgot I could use it inside the shell. Thanks. Mike > On Sep 11, 2016, at 16:58, Simon Slavin <slav...@bigfraud.org> wrote: > > > On 11 Sep 2016, at 10:53pm, mikeegg1 <mikee...@mac.com> wrote: > >> Thanks. I thought not. I’m doing this from PERL on a Mac

Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
Thanks. I thought not. I’m doing this from PERL on a Mac and don’t know if I can fully access last_row_id(). :) Mike > On Sep 11, 2016, at 16:52, Simon Slavin <slav...@bigfraud.org> wrote: > > > On 11 Sep 2016, at 10:48pm, mikeegg1 <mikee...@mac.com> wrote: >

[sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
I think Oracle (a long distant memory) has variables like @variable or @@variable where you can do something like '@variable = select rowid from table where field = 4' and then later do 'insert into othertable (field2) value(@variable)’. Does this make sense? I’m wanting to in the shell select

[sqlite] Any way to do inexpensive SQLite database/table versioning? (I.e. cheap snapshotting & jumping between)

2016-05-15 Thread mikeegg1
I was once told of an idea (decades ago) of versioning data within a table where one column has a real/float value that is the version number. The data in the table can be committed as necessary. If the data needs to be rolled back the data can be rolled back/deleted to the table based on the

[sqlite] Podcast with Dr Hipp: SQLite history, success and funding

2016-05-15 Thread mikeegg1
I?m listening to the podcast now. Great episode and I?ve subscribed to their podcast series. As a side thought of what I?ve listened to so far? Is there a page/reference/discussion about how the consortium was/is set up? I am integrating SQLite into my Mac OS X application and like SQLite. I am

Re: [sqlite] Question about opening database files

2014-06-22 Thread mikeegg1
I’m working on accessing sqlite3 from a process/program that is not able to access sqlite3.a by using sockets through socat(1). Mike On Jun 22, 2014, at 9:47 AM, Adil Hasan wrote: > Hello, > I would like to add sqlite to a workflow. But, I cannot directly open the >

Re: [sqlite] Multiprocess accessing SQLite connection

2013-06-15 Thread mikeegg1
On Fri, 14 Jun 2013, Richard Hipp might have said: > On Fri, Jun 14, 2013 at 9:10 AM, Vijay Khurdiya < > vijay.khurd...@securetogether.com> wrote: > > > Please confirm below statement is TRUE when Sqlit3 configure in thread > > safe mode. (I am checking for Serialized) > > > > "Multiple