Re: [sqlite] Best Practice: Storing Dates

2015-01-14 Thread Adam Devita
, have the authority to change the time zone or implementation date for their population, there is a high potential for change. 3rd party time zone rule libraries can externalize most of the maintenance work without affecting the core app or the database. regards, Adam DeVita On Wed, Jan 14, 2015

Re: [sqlite] Counting rows

2014-12-11 Thread Adam Devita
From previous reading (years ago on this list) I normally do select count(1) from tableName ; to count the rows in a table. as an alternate, select count(primary_key_or_SomeIndexName) from tableName when trying to get an actual count. beware: select count(someField) from table; will not count

Re: [sqlite] DEFAULT expression ignored for INTEGER PRIMARY KEYs?

2014-09-25 Thread Adam Devita
Your table definition seems to have a contradiction. The expression INTEGER PRIMARY KEY is a special keyword that means 'auto-increment', which would be a default value. DEFAULT (random() ) would contradict the auto-increment instruction. The row id was being used to generate the key. On Thu,

Re: [sqlite] Window functions?

2014-08-28 Thread Adam Devita
. Thanks for the references about windowing functions. Very interesting. The point of what is heavy now vs in 2020 is well made. Is Windowing a Major endeavor, better for sqlite 4? Adam DeVita On Wed, Aug 27, 2014 at 8:25 PM, Keith Medcalf kmedc...@dessus.com wrote: On Wednesday, 27 August, 2014

Re: [sqlite] Crash in sqlite3_mutex_try [Was: SQLite 3.8.6 beta]

2014-08-12 Thread Adam Devita
1a) Somebody is paying you to do it. 1b) Incremental cost (or risk) of supporting it is small compared to the cost (or risk) of porting /upgrading Adam On Tue, Aug 12, 2014 at 2:46 AM, Klaas V klaasva...@yahoo.com wrote: Jan wrote: ** can manually set this value to 1 to emulate Win98

Re: [sqlite] SQLite Support for CE x32 FW 3.5

2014-08-06 Thread Adam Devita
Did you already read https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki#sqlite-netFx35-binary-PocketPC-ARM-2008 ? On Tue, Aug 5, 2014 at 10:32 AM, Tobias Stüker t.stue...@beckhoff.com wrote: Hello, I am developing an .NET Framework 3.5 application for a Windows CE x32 PC.

Re: [sqlite] How synchronize two databases

2014-03-10 Thread Adam Devita
. regards, Adam DeVita On Mon, Mar 10, 2014 at 8:15 AM, Simon Slavin slav...@bigfraud.org wrote: On 10 Mar 2014, at 12:58pm, Muhammad Bashir Al-Noimi mbno...@gmail.com wrote: May I get some help from you guys? If you're asking how to synchronise two SQL databases which may have had

Re: [sqlite] SQLite destroys civilization.

2014-03-03 Thread Adam Devita
LOL! Hopefully they wrote credit at the top of the source file. I saw season 1 of the show. Aaron is a good guy. http://en.wikipedia.org/wiki/Revolution_%28TV_series%29 A On Sun, Mar 2, 2014 at 9:40 PM, mm.w 0xcafef...@gmail.com wrote: LOL don't know if it will go thru see png layer or

Re: [sqlite] Recommended way to delete rows

2014-02-28 Thread Adam Devita
Yes. On Fri, Feb 28, 2014 at 12:18 PM, L. Wood lwoo...@live.com wrote: I expect #2 to work best. Make sure to enclose the whole thing in an explicit transaction (or at least, run large batches within explicit transactions; one implicit transaction per deleted row will be slow as

Re: [sqlite] How to use SQLite in C#

2014-02-13 Thread Adam Devita
. regards, Adam DeVita On Wed, Feb 12, 2014 at 9:23 AM, Jamiil jam...@live.ca wrote: After downloading sqlite-netFx451-static-binary-x64-2013-1.0.90.0 and uncompressing it, I got this list of file: Installer.exe Installer.pdb northwindEF.db SQLite.Designer.dll SQLite.Designer.pdb

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Adam Devita
Good day, I'd rather the warning be in the text when you open the sqlite tool with an implied in memory database. Put an extra \n if you want the warning to stand out. Adam On Mon, Feb 10, 2014 at 1:26 PM, Petite Abeille petite.abei...@gmail.comwrote: On Feb 10, 2014, at 5:19 PM, Gabor

[sqlite] possible bug 3.8.1 /3.8.3

2014-02-03 Thread Adam Devita
, data_blob BLOB NOT NULL); sqlite SELECT id, data_blob FROM data WHERE stream_num = 2 order by timestamp asc LIMIT 1; 4|☺ sqlite SELECT id, data_blob FROM data WHERE timestamp = (SELECT MIN(timestamp) FROM data WHERE stream_num = 2) LIMIT 1; 3|☻ sqlite regards, Adam DeVita

Re: [sqlite] possible bug 3.8.1 /3.8.3

2014-02-03 Thread Adam Devita
. regards, Adam On Mon, Feb 3, 2014 at 12:47 PM, Richard Hipp d...@sqlite.org wrote: Can you provide data? Without some sample data, we cannot tell if the answer SQLite is providing is right or wrong. On Mon, Feb 3, 2014 at 12:25 PM, Adam Devita adev...@verifeye.com wrote: Good day, I'm

Re: [sqlite] SQLite patch contribution

2013-07-22 Thread Adam DeVita
Is it possible for one in a nation that doesn't permit dedication to public domain to simply gift the work (and intellectual rights) to someone personally, who can and will the reassign it to the public domain (such as a member of the sqlite dev team)? On Mon, Jul 22, 2013 at 9:30 AM, Dušan

Re: [sqlite] Command-line utility

2013-07-11 Thread Adam DeVita
http://www.sqlite.org/download.html scroll to Precompiled Binaries for Windows It runs just fine on 32 bit windows. Adam On Thu, Jul 11, 2013 at 12:20 PM, RSmith rsm...@rsweb.co.za wrote: Could someone send me a build with the current trunk of the command-line utility for Windows 32Bit with

Re: [sqlite] Getting Started with Sqlite

2013-05-22 Thread Adam DeVita
When you open the command prompt you will see something like this: c:\PINTSsqlite3.exe SQLite version 3.6.10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite The above clearly indicates version 3.6.10. Others on the list will correct me if I am wrong, but the command

Re: [sqlite] Malformed database recovery

2013-05-14 Thread Adam DeVita
Where there any errors on .read dump_all.sql ? was PRAGMA integrity_check; on the new file or the old one? On Tue, May 14, 2013 at 10:29 AM, Marcin ign...@op.pl wrote: Hi everybody. Somehow my database got malformed, and journal file is unfortunately nowhere to found. Suprisingly, I'm

Re: [sqlite] Malformed database recovery

2013-05-14 Thread Adam DeVita
If you can get the errors, by say redirecting the output from the .read to a file, the error message will likely be enlightening. When I recover corrupt db files, there are often some records with a conflicting primary key. In those cases I have to edit the input to fix the old one. Naturally,

Re: [sqlite] system.data.sqlite example code?

2013-01-28 Thread Adam DeVita
From this URL http://www.dreamincode.net/forums/topic/157830-using-sqlite-with-c%23/ The basics of how to set your project and include/reference the Dlls are there. You should be able to adapt to your IDE. (I currently use VS2010 for C# sqlite projects.) and this one

Re: [sqlite] complex update

2012-12-19 Thread Adam DeVita
Thank you for the principal. I had to rewrite a little since I only wanted to affect the rows that were using the max entry. Adam On Tue, Dec 18, 2012 at 12:58 PM, Igor Tandetnik i...@tandetnik.org wrote: On 12/18/2012 12:27 PM, Adam DeVita wrote: There is a table products where has

[sqlite] complex update

2012-12-18 Thread Adam DeVita
Good day, I'm attempting to fix some bad data: There is a table products where has a location id. Unfortunately duplicate dictionary names got added to list of locations products haslocationid and a bunch of other stuff I can easily get the max (bad) and min (good) location ids

Re: [sqlite] just a test

2012-12-10 Thread Adam DeVita
Gmail users: You can set a Filter to ensure the Igor's messages are delivered to your in-box. I did this last week and since then his messages do not end up in my SPAM folder. If you search This message may not have been sent by... warning in Gmail help, there are instructions. Adam On Mon,

Re: [sqlite] VC++ and SQLite

2012-11-12 Thread Adam DeVita
It isn't VS2010 specific. Even going back to VS6 writing your own C++ wrapper and including the.c file you had to tell it to not use precompiled headers for that file. (Both Debug and Release builds) You should tell VS that this file will not ever be using precompiled headers. On VS2012

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-29 Thread Adam DeVita
Thanks for the clarification. Adam On Sat, Oct 27, 2012 at 12:13 PM, Simon Slavin slav...@bigfraud.org wrote: On 27 Oct 2012, at 6:36am, Dan Kennedy danielk1...@gmail.com wrote: On 10/27/2012 07:06 AM, Simon Slavin wrote: On 26 Oct 2012, at 11:05pm, Clemens Ladischclem...@ladisch.de

[sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Adam DeVita
the statement given that it returned an error. I'm using the basic amalgamation c file SQLite version 3.7.4. regards, Adam DeVita ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Why can't SQLite drop columns?

2012-10-09 Thread Adam DeVita
accept that Alter table can be expensive.Is there more to it? Some sort of ACID breakdown? regards, Adam DeVita On Tue, Oct 9, 2012 at 12:45 PM, Peter Haworth p...@lcsql.com wrote: Pete lcSQL Software http://www.lcsql.com You're probably already aware of this but there are third party tools

Re: [sqlite] SQLLite Question regarding instances and files

2012-09-18 Thread Adam DeVita
Good day, You are treating the database files as test log files, correct? If you are wanting a PC to execute a program that accesses an sqlite database file on a network, it is possible. If you read through previous discussions in this mail list archive you will find numerous warnings and

Re: [sqlite] C# Dynamic data type

2012-08-08 Thread Adam DeVita
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Adam DeVita [adev...@verifeye.com] Sent: Tuesday, August 07, 2012 10:26 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] C# Dynamic data type Good day, I've been reading a bit

[sqlite] C# Dynamic data type

2012-08-07 Thread Adam DeVita
Good day, I've been reading a bit of conflicted stuff online in terms of data type. The most basic question, in C#, is can you easily determine the data type of the Nth entry in a column. {Ex: Create table A( x TEXT, y ) ... a few inserts, binding a float, then a string, then an int into y..

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-03 Thread Adam DeVita
Good day, I had a similar sounding issue on 2 different flavours of Windows. The problem was an over active anti-virus program. Adam On Fri, Aug 3, 2012 at 11:45 AM, Simon Slavin slav...@bigfraud.org wrote: On 3 Aug 2012, at 3:33pm, Tobias Giesen tobiasgie...@gmail.com wrote: I have one

Re: [sqlite] Not sure how to interrupt this

2012-06-28 Thread Adam DeVita
SQLITE DONE is what you get when you successfully run an insert. What is the problem? Adam On Wed, Jun 27, 2012 at 7:02 PM, Jeff Archer jarch...@yahoo.com wrote: I am getting back SQLITE_DONE (101) from sqlite3_step() and the statement is clearly being executed. SQL: INSERT INTO

Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread Adam DeVita
Do not use precompiled headers on sqlite3.c On Mon, Jun 25, 2012 at 4:22 PM, Pavel Ivanov paiva...@gmail.com wrote: On Mon, Jun 25, 2012 at 4:15 PM, deltagam...@gmx.net deltagam...@gmx.net wrote: Hello, Im using MSVS 2010 for an c++ GUI project. After including sqlite3.h and sqlite3.c

Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-28 Thread Adam DeVita
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto: sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita Sent: 25 May 2012 16:37 To: General Discussion of SQLite Database Subject: Re: [sqlite] FW: Problem with SQLite when deployed. Simple thing first: Did you ensure

Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Adam DeVita
Simple thing first: Did you ensure that the SQLite.Interop.dll is in the path that the PC is searching? regards, Adam On Fri, May 25, 2012 at 10:57 AM, Peter Walburn peter.walb...@omega-data.com wrote: Hi, I have an application written in C# .Net 4.0 Framework. I use SQLite within the

Re: [sqlite] FW: Problem with SQLite when deployed.

2012-05-25 Thread Adam DeVita
-boun...@sqlite.org [mailto: sqlite-users-boun...@sqlite.org] On Behalf Of Adam DeVita Sent: 25 May 2012 16:37 To: General Discussion of SQLite Database Subject: Re: [sqlite] FW: Problem with SQLite when deployed. Simple thing first: Did you ensure that the SQLite.Interop.dll is in the path

Re: [sqlite] Please review this email to sqlite's mailing list

2012-05-16 Thread Adam DeVita
Did you check out http://www.sqlite.org/inmemorydb.html Could you use an in-memory db to act as a db for a save point? When you are ready to commit, do so from 1 in memory db, while accumulating into another in preparation for that save point. Adam On Tue, May 15, 2012 at 1:55 PM, Charles

Re: [sqlite] [sqlite-dev] Explain what 'transaction' means in javascript for sqlite, please?

2012-05-09 Thread Adam DeVita
STW: http://stackoverflow.com/questions/740523/getting-a-webkit-executesql-transaction-to-return-a-value other references http://stackoverflow.com/questions/61972/javascript-sqlite On Wed, May 9, 2012 at 10:32 AM, Pavel Ivanov paiva...@gmail.com wrote: And again you wrote to the wrong mailing

[sqlite] .NET and network server

2012-04-24 Thread Adam DeVita
Good day, Is anyone using .NET c# code as a client to connect to one of the free network server implementations? regards, Adam ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] error 404

2012-04-23 Thread Adam DeVita
Good day, This page http://sqlite.org/cvstrac/wiki?p=SqliteNetwork Is giving an error 404 for this link *SQL4Sockets* (http://www.oneledger.co.uk/sql4sockets.html) regards, Adam ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] type-o on http://www.sqlite.org/download.html

2012-04-19 Thread Adam DeVita
a letter 'd'. The word an should be and. source code and binaries regards, Adam DeVita ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] why one row's results isn't the same between program and command shell

2012-03-21 Thread Adam DeVita
|3||1 PROGRAMMER-LAB00-03-0D-00-00-01|3||1 ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0 (Windows 7 32 bit edition PC. Tried with new copy of amalgamation 3.7.11 as well as 3.7.4) Why is the last entry wrong? Any suggestions as to how to review? regards, Adam DeVita VerifEye Technologies Inc

Re: [sqlite] why one row's results isn't the same between program and command shell

2012-03-21 Thread Adam DeVita
Sorry for false alarm. Please disregard this thread: Solution: make sure you quit everything and isolate the code. There is a subsequent write to the new record that made it appear as a problem, when it wasn't. Adam On Wed, Mar 21, 2012 at 3:25 PM, Adam DeVita adev...@verifeye.com wrote

Re: [sqlite] insert image into db - windows batch

2012-01-18 Thread Adam DeVita
, X'reference_to_your_hex_data' ) the X' ' to denotes your hex value. This is listed in the documentation. regards, Adam DeVita On Wed, Jan 18, 2012 at 10:02 AM, Petr Lázňovský la...@volny.cz wrote: On 18 Jan 2012, at 12:30pm, Petr Lázňovský wrote: have windows batch working with sqlite, may I insert

Re: [sqlite] Auto index with wrong number of entries

2011-06-29 Thread Adam DeVita
Success! On Tue, Jun 28, 2011 at 11:34 AM, Simon Slavin slav...@bigfraud.org wrote: On 28 Jun 2011, at 4:22pm, Adam DeVita wrote: I can see the data that I want to export. How do I fix these indexes? Use the sqlite3 command-line shell to dump the database to SQL commands, then create

Re: [sqlite] Auto index with wrong number of entries

2011-06-29 Thread Adam DeVita
2011, at 2:04pm, Adam DeVita wrote: On Tue, Jun 28, 2011 at 11:34 AM, Simon Slavin slav...@bigfraud.org wrote: Use the sqlite3 command-line shell to dump the database to SQL commands, then create a new database by reading it back in. While the data is in the SQL command file, you can

[sqlite] Auto index with wrong number of entries

2011-06-28 Thread Adam DeVita
... table above. I can see the data that I want to export. How do I fix these indexes? regards, Adam DeVita ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite as a Logger: How to mimic rotation of logs?

2011-05-10 Thread Adam DeVita
Why not use INSERT OR REPLACE to your advantage? If you set the maximum number of log entries you wanted to keep, then kept track of your log insert statement, you could wrap by int this_log_entry_id=1; //initialize.. actually could be initialized by getting the log entry id of the min date in

Re: [sqlite] What happens if you insert more than your RAM size into an in memory database?

2011-04-19 Thread Adam DeVita
Thanks for the responses. Our application is typically implemented on a standard laptop PC. It seems that the symptoms displayed are consistent with what this list describes would happen, so it looks like I can start thinking of how to write a defence. It does suddenly become very slow. I

[sqlite] What happens if you insert more than your RAM size into an in memory database?

2011-04-18 Thread Adam DeVita
Good day, What happens if you insert more than your RAM size into an in memory database? (I'm particularly interested in the Windows context). regards, Adam ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] X most recent entries

2011-03-14 Thread Adam DeVita
select id from table order by id desc limit 5000 Adam On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham i...@omroth.com wrote: Hey guys. I have a table with an autoincrement primary ID, and as part of a select I would like to only take the 5000 largest/most recent ids. Is there a quick way

Re: [sqlite] X most recent entries

2011-03-14 Thread Adam DeVita
WHERE player2 = '?') AND (complete=0 OR p1SubmitScore=0 OR p2SubmitScore=0) And I only want to consider the last 5000 for any SELECTs from multiturnTable. Thanks, Ian On 14/03/2011 17:54, Adam DeVita wrote: select id from table order by id desc limit 5000 Adam On Mon, Mar 14, 2011

Re: [sqlite] Propose minor incompatible API change

2011-01-11 Thread Adam DeVita
I think that a bunch of good points have been made, especially as to why you should hold your ground. (I don't have sympathy for poor code that doesn't follow the documentation, especially when there is a large, competent, and helpful community group that usually comes to people's aid in less

Re: [sqlite] R: R: Crypto lib for Sqlite - suggest required

2011-01-10 Thread Adam DeVita
Just to add my $0.02 We use http://www.safenet-inc.com/ HASP HL Encryption. (We use HASP keys for end user products so it was 'free' to my internal product tracking system db.) This key allows the exe to get encrypted and optionally a data file as well. The encryption of the program provides us

Re: [sqlite] 64 bit sqlite 3

2010-12-22 Thread Adam DeVita
, after showing that my 64 bit problems go away when I include the amalgamation source in the project, the whining just stops. thanks :) Adam On Fri, Dec 17, 2010 at 5:20 PM, Simon Slavin slav...@bigfraud.org wrote: On 17 Dec 2010, at 4:30pm, Adam DeVita wrote: Will a 64 bit Windows DLL

Re: [sqlite] 64 bit sqlite 3

2010-12-17 Thread Adam DeVita
Will a 64 bit Windows DLL eventually be posted for download? On Fri, Dec 17, 2010 at 9:45 AM, Eric Smith eas@gmail.com wrote: On Fri, Dec 17, 2010 at 4:36 AM, giuseppe500 giuseppe...@yahoo.it wrote: There is a version of SQLite 3 for 64-bit systems? or, you can simply compile the

Re: [sqlite] Tricky grouping query

2010-10-01 Thread Adam DeVita
Why would you want to do this in plane sql, as opposed to using the API to go through the list and derive it? On Fri, Oct 1, 2010 at 3:37 PM, Andy Chambers achambers.h...@gmail.comwrote: Given the following create table events ( id, date, status ); insert into events values

Re: [sqlite] Is there a table that show all the available function from sqlite3?

2010-08-13 Thread Adam DeVita
Are you looking for http://www.sqlite.org/c3ref/funclist.html ? On Fri, Aug 13, 2010 at 12:37 PM, Peng Yu pengyu...@gmail.com wrote: Hi, http://www.sqlite.org/docs.html I don't see a table that shows all the available functions in sqlite3. Would you please let me know if there is such a

Re: [sqlite] Substring (LIKE %key%) searches, would FTS3 with suffix-tree tokenizer be the fast way?

2010-08-06 Thread Adam DeVita
A variant on Simon's plan. Are the 10,000 rows static, slowly changing, or frequently changing? Does it make sense to pre-calculate some counts at the time data is loaded? Is this memory constrained so much that you can't afford 1 or 2 MB to let you look up based on ints? (I'm assuming that one

Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Adam DeVita
From the point of view of a C question, make your array of characters large enough to hold the characters you want (and terminating null) before copying them in. From the point of view of an SQL: if you want to change the comparison constant in a where clause, look up bind parameters. read

Re: [sqlite] concat 2 const chars ?

2010-07-09 Thread Adam DeVita
and don't use strcpy here is why https://buildsecurityin.us-cert.gov/bsi-rules/home/g1/848-BSI.html On Fri, Jul 9, 2010 at 3:06 PM, rollerueckwaerts rollerueckwae...@gmx.netwrote: Hello, I try to get an sql query string from 2 const chars. const char *language; language = '6'; const char

Re: [sqlite] Mail loop?

2010-06-14 Thread Adam DeVita
Is it possible for the list admin to seed a message to the list that, if auto-replied, would automatically remove one from the list? This thread, although off the sqlite topic, is still interesting. regards, Adam On Mon, Jun 14, 2010 at 10:06 AM, Black, Michael (IS) michael.bla...@ngc.com

Re: [sqlite] database development - correct way?

2010-06-09 Thread Adam DeVita
I wouldn't advise using an SQL keyword as a table name: Order I presume that your order collection table example is shorter than the real one for the sake of the example? One often sees a date or time of some sort associated with an order so that one can create reports based on dates. (How many

Re: [sqlite] copy data from one db to another

2010-06-08 Thread Adam DeVita
start by doing an open db1 (as main) then attach path to db2 as 'db2' insert into main.table_one_name select * from db2.table_one_name ; This selects all records from db2 and puts them into db1 in one statement. Adam On Tue, Jun 8, 2010 at 3:02 PM, Scott Frankel fran...@circlesfx.com wrote:

Re: [sqlite] copy data from one db to another

2010-06-08 Thread Adam DeVita
:09 PM, Scott Frankel fran...@circlesfx.com wrote: On Jun 8, 2010, at 12:07 PM, Adam DeVita wrote: start by doing an open db1 (as main) then attach path to db2 as 'db2' insert into main.table_one_name select * from db2.table_one_name ; This selects all records from db2 and puts them

Re: [sqlite] Update: set multiple values

2010-05-11 Thread Adam DeVita
but... ...but I LOVE my hammer! How dare every problem not be a nail? ;) Good point. Likely all the updates can fit nicely into a transaction. On Mon, May 10, 2010 at 5:11 PM, Simon Slavin slav...@bigfraud.org wrote: On 10 May 2010, at 9:25pm, Adam DeVita wrote: Simon, can you

Re: [sqlite] sqlite connection?

2010-05-11 Thread Adam DeVita
Yes. One can also attach 'somedatabase path' as anothername ; and you can run a query accessing both at the same time. regards, Adam On Tue, May 11, 2010 at 1:45 PM, john cummings jndbusin...@gmail.comwrote: hi all, i'm new to this forum and sqlite. is it possible to have an executable

Re: [sqlite] Update: set multiple values

2010-05-10 Thread Adam DeVita
Simon, can you expand your syntax, or are you just saying, get x,y,z store them in a set of variables, then run update with appropriate bindings? Hopefully this related question isn't called hijacking a thread. I feel this belongs together under set multiple values using the update query. I'm

Re: [sqlite] Returning column to default

2010-05-06 Thread Adam DeVita
Is there a primary key on the table? Is it possible to use insert or replace instead of update, and then not reference the column you want to set as a default? On Thu, May 6, 2010 at 10:41 AM, Andy Gibbs andyg1...@hotmail.co.uk wrote: You could write a trigger that sets default value if NULL

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Adam DeVita
Is it possible there is a null, tab, newline or other invisible character? Try select timeStamp, '' || resourceType || 'xx' From MyTable where resourceType like 'PSM' LIMIT 10; On Fri, Apr 30, 2010 at 9:53 AM, ecforu ecforus...@gmail.com wrote: I don't think it is a case issue. See

Re: [sqlite] column output truncating

2010-04-23 Thread Adam DeVita
Could you include a bit more information about your post? (Version number, operating system etc.) I'm unsure if you have compiled something or are using the command line tool. There are lots of very knowledgeable and helpful people on the list. On Thu, Apr 22, 2010 at 6:31 PM, Derek Martin

Re: [sqlite] Date Dimension

2010-04-22 Thread Adam DeVita
good ideas. The spread sheet trick hadn't occurred to me. I think I'll go that route since it keeps things user readable thank you for your thoughts, all. regards, Adam On Thu, Apr 22, 2010 at 2:51 AM, Oliver Peters oliver@web.de wrote: Adam DeVita adev...@... writes

[sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
Good day, Given the context I'm in, sqlite is going to be used for our data warehousing. (We generate about 2MB of raw data in a month, so we don't think we need a heavy DB engine.) Since most warehouses have one, which are very similar from application to application, I'm wondering if there

Re: [sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
/wiki/Dimension_(data_warehouse)http://en.wikipedia.org/wiki/Dimension_%28data_warehouse%29 . But I don't have any answer to the question asked. Pavel On Wed, Apr 21, 2010 at 3:21 PM, P Kishor punk.k...@gmail.com wrote: On Wed, Apr 21, 2010 at 1:50 PM, Adam DeVita adev...@verifeye.com wrote

Re: [sqlite] Date Dimension

2010-04-21 Thread Adam DeVita
, age from epoch, month name, etc? regards, Adam On Wed, Apr 21, 2010 at 3:59 PM, P Kishor punk.k...@gmail.com wrote: On Wed, Apr 21, 2010 at 2:37 PM, Adam DeVita adev...@verifeye.com wrote: Yes. A Date dimension is a table that has all possible dates for your data, thus making

Re: [sqlite] SQLite parsing of a .sql file

2010-04-09 Thread Adam DeVita
Is this a 1 off import? If so, perhaps the command line tool can .read it. On Fri, Apr 9, 2010 at 2:13 PM, Shaun Seckman (Firaxis) shaun.seck...@firaxis.com wrote: Greetings, I've got a .SQL file that contains multiple SQL insert statements for various tables as well as comments embedded

Re: [sqlite] Performance problem with count(*) calculation

2010-04-01 Thread Adam DeVita
How does $ time sqlite3 test32k.db select count(1) from role_exist perform? On Thu, Apr 1, 2010 at 5:52 AM, Alexey Pechnikov pechni...@mobigroup.ruwrote: Hello! $ time sqlite3 test32k.db select count(*) from role_exist 1250 real0m58.908s user0m0.056s sys 0m0.864s $

Re: [sqlite] Question about binding

2010-03-24 Thread Adam DeVita
Good day, For the sake of fun, I have to share this - especially with tall this talk of binding all the parameters. void poem(CString pth) { sqlite3_stmt *ppStmt; //statement pointer sqlite3 *db; //database const char *pzTail; char *pzerr; if( sqlite3_open(pth, db) ){

Re: [sqlite] The character ' not liked by sqlite?

2010-03-02 Thread Adam DeVita
Good day, If you look in http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob for the function int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); This will allow you to bind any character into an SQL statement. There are other benefits to using this technique.

Re: [sqlite] Newbie problem using special column name

2010-01-25 Thread Adam DeVita
Create the table using single quotes around the strange name. sqlite create table x (boomer int, 'squid-nick' text); sqlite insert into x values (1,'asdlh'); sqlite select * from x; 1|asdlh sqlite select squid-nick from x; SQL error: no such column: nick sqlite select 'squid-nick' from x;

Re: [sqlite] Limitation on Column count

2010-01-12 Thread Adam DeVita
Good day, In general I try to work within the limits of any database engine that I am using. Often, the limits are there for good reasons (such as speed problems). I would suggest seeing if there is a way to normalize the big tables such that infrequently used columns are split into tables that

Re: [sqlite] Limitation on Column count

2010-01-12 Thread Adam DeVita
a measurement_id to each measurement). Second, the most common use case is to view the table in the currently foreseen format - so, I'd pay both in space and time... Anyway, thanks for the suggestion! Regards, Stefan Adam DeVita wrote: Good day, In general I try to work within

Re: [sqlite] Confusing FAQ(26) wording

2009-12-30 Thread Adam DeVita
http://www.sqlite.org/nulls.html seems to clarify things for me on this topic. Adam On Wed, Dec 30, 2009 at 9:13 AM, Tobias Hoffmann lsqlite-l...@thax.hardliners.org wrote: Hi, I had a hard time to understand the FAQ entry on UNIQUE constraint -- in the end I had to try out sqlite's

Re: [sqlite] Archive Search Engine

2009-12-29 Thread Adam DeVita
But there is a search engine on: http://www.mail-archive.com/sqlite-users%40sqlite.org/info.html It is right at the top. Adam On Tue, Dec 29, 2009 at 12:02 PM, Bill Marvin bill_mar...@hotmail.comwrote: It would be very helpful if there was a search engine for the sqlite-user mailing list

Re: [sqlite] Location of Sqlite Files

2009-11-27 Thread Adam DeVita
1) save the db wherever is appropriate for your application. (network drives are generally considered to be a bad idea) 2) An sqllite db is a file. There are lots of ways to delete files Adam On Fri, Nov 27, 2009 at 2:54 PM, mr_orange rlvl...@gmail.com wrote: Hey, I am kind of new to SQLite.

[sqlite] Windows 7?

2009-11-03 Thread Adam DeVita
Good day, Will a new DLL be required for Windows 7 ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Adam DeVita
Another way SELECT name, sql FROM sqlite_master WHERE type='table' and name ='yourtable name' the field sql will give you the full table structure as a string. Parse for your desired table name. No statements fail. On Tue, Nov 3, 2009 at 4:37 PM, Igor Tandetnik itandet...@mvps.org wrote:

Re: [sqlite] .import on a .csv file

2009-10-22 Thread Adam DeVita
Do you have any new lines, returns, or tabs in any of the real data? Can you prove it? Is this a 1 off thing or are you going to do this routinely? There has been a lot of discussion on this list about importing csv data and the hardships of writing a good csv importer. If this is a one off,

Re: [sqlite] SQLite encription

2009-10-19 Thread Adam DeVita
One can use a 3rd party tool such as a Alladdin HASP key. This encrypts the application, and optionally the database file too. The drivers for the program won't execute a program if it detects a debugger. This solution is of course limited to operating systems with the available drivers. Once

Re: [sqlite] Synchronising multiple copies of a database

2009-10-07 Thread Adam DeVita
regarding this The fault is that almost nobody does it right: they neglect to keep an 'unaltered central copy' and think they can cross-apply journals each time two databases talk to one-another. That does not work for various reasons. Would a central repository of journals that can be applied

Re: [sqlite] Insert speed greatly decreasing over time

2009-10-07 Thread Adam DeVita
Would dropping and re-creating an index help? On Wed, Oct 7, 2009 at 2:19 PM, Alexey Pechnikov pechni...@mobigroup.ruwrote: Hello! Try this: pragma cache_size=20; Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users

Re: [sqlite] Synchronising multiple copies of a database

2009-10-07 Thread Adam DeVita
there are N entries of the other guy's customer in the database depending on how many times they do it. On Wed, Oct 7, 2009 at 3:18 PM, Simon Slavin slav...@hearsay.demon.co.ukwrote: On 7 Oct 2009, at 7:20pm, Adam DeVita wrote: regarding this The fault is that almost nobody does it right

Re: [sqlite] Database Diff libs or applications

2009-10-01 Thread Adam DeVita
There has been a lot of discussion of this and several of us are doing it. Are you talking about A) DB1 which has modify data and DB2 which only receives modifications from DB1 only, or B) DB1 and DB2 both get updates independently and need to be synchronized? or C) something else Not (A or

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Adam DeVita
Good day, Are you looking to simply identify records that are different (not missing from the tables) or identify records with ANY field different and get the result? Is there a primary key? Posting the structure would be helpful. This should not be hard. C:\Documents and

Re: [sqlite] translating CSV file into sqlite3 database for iPhone?

2009-08-07 Thread Adam DeVita
This is why I generally advocate TAB delimited files over CSV Restaurant , Menu Item, Price Tom, Dick The MAN, and Harry's Bar Grill , Specials /new stuff! Mikey's Burger Delishiousness ' , $5 If you only have to upload your data once, you should be able to use a spreadsheet program to

Re: [sqlite] Protect against SQL injection inside of the database?

2009-07-16 Thread Adam DeVita
http://unixwiz.net/techtips/sql-injection.html is a nice introduction to sql injection attacks. (Learning by example) It also explains why binding is far superior to trying to invent a set of rules and cleaning the input. . On Thu, Jul 16, 2009 at 9:01 AM, Michael Schlenker m...@contact.de

Re: [sqlite] Optimizing insert or replace speed

2009-07-15 Thread Adam DeVita
d.record_updatetime) On Wed, Jul 15, 2009 at 7:33 AM, Igor Tandetnik itandet...@mvps.org wrote: Adam DeVita wrote: I've identified the following query as a bottle neck in a utility I've written. insert or replace into main.masterlist select * from delta.masterlist d where d.write_out_ok=0

[sqlite] Optimizing insert or replace speed

2009-07-14 Thread Adam DeVita
Good day, Could someone explain where I'm going wrong with this? I've identified the following query as a bottle neck in a utility I've written. insert or replace into main.masterlist select * from delta.masterlist d where d.write_out_ok=0 and d.sn not in(select M.sn from main.masterlist M

Re: [sqlite] Optimizing insert or replace speed

2009-07-14 Thread Adam DeVita
Awesome, brilliant, and decisive! New times: No index on Delta File: 3 seconds. Index on SN: 4 seconds. Index on MasterList (write_out_ok, MFGID, TypeID, SN); 4 seconds. The speedup of the one query is greater than this because the above time figures include 1) A query to see if there are any

Re: [sqlite] Nested Inner Join Help

2009-07-02 Thread Adam DeVita
why not use: SELECT A.ID http://a.id/, A.Column1, A.Column2, B.Column1, C.Column1 FROM A INNER JOIN B ON A.Column3 = B.ID http://b.id/ INNER JOIN C ON B.Column2 = C.ID http://c.id/ ? On Thu, Jul 2, 2009 at 2:53 PM, Ed Hawke edward.ha...@hawkeyeinnovations.co.uk wrote: Hi all, I'm having

Re: [sqlite] search in archive

2009-06-19 Thread Adam DeVita
There is a search of archives at http://www.mail-archive.com/sqlite-users%40sqlite.org/ On Fri, Jun 19, 2009 at 2:43 PM, Kees Nuyt k.n...@zonnet.nl wrote: On Fri, 19 Jun 2009 13:56:52 -0400, Rizzuto, Raymond raymond.rizz...@sig.com wrote: Is it possible to have a search feature for the

  1   2   >