Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-19 Thread Jose Isaias Cabrera
Simon Slavin, on Saturday, January 18, 2020 04:58 PM, wrote... > > On 18 Jan 2020, at 9:30pm, Csanyi Pal, on > > > can one edit a multiline SQL statement in the sqlite3 CLI? > > No. > > But if you make a multiline SQL statement in a text file you can paste it > into the CLI all in one operation.

Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Keith Medcalf
While there are lines to be edited: Press up arrow until line is recalled Edit the line Press the ENTER key to enter that line Maybe you have to compile your own to include readline (on Linux), but it works for me. Both Linux and Windows. -- The fact that there's a Highway to Hell but o

Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Simon Slavin
On 18 Jan 2020, at 9:30pm, Csanyi Pal wrote: > can one edit a multiline SQL statement in the sqlite3 CLI? No. But if you make a multiline SQL statement in a text file you can paste it into the CLI all in one operation. ___ sqlite-users mailing list s

Re: [sqlite] TO

2020-01-08 Thread Simon Slavin
On 8 Jan 2020, at 4:13pm, R Smith wrote: > Anyone have an idea where the word TO is used in SQL in SQLite? I seem to remember that the language used by the SQLite parser works from a table of data. Would questions like this be easy to answer using that table ? _

Re: [sqlite] TO

2020-01-08 Thread R Smith
On 2020/01/08 6:19 PM, Richard Hipp wrote: On 1/8/20, R Smith wrote: Anyone have an idea where the word TO is used in SQL in SQLite? alter table t1 rename TO t2; rollback TO savepoint1; So obvious...  My brain must be needing a break. Thank you Richard and Tim! _

Re: [sqlite] TO

2020-01-08 Thread Tim Streater
On 08 Jan 2020, at 16:13, R Smith wrote: > Hopefully the last of the silly questions... > > The word "TO" is given as an SQLite Keyword, but I cannot find any > reference to it being used anywhere in the SQL used by SQLite. > > The search doesn't help (because the word TO is everywhere in text),

Re: [sqlite] TO

2020-01-08 Thread Richard Hipp
On 1/8/20, R Smith wrote: > > Anyone have an idea where the word TO is used in SQL in SQLite? > alter table t1 rename TO t2; rollback TO savepoint1; -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] To JSON or not to JSON

2018-07-08 Thread Clemens Ladisch
Cecil Westerhof wrote: > my SQLite database contains for example: > > "5BF19111-9FD5-48CA-B919-A09411346A87""[ > ""The journey of a thousand miles > must begin with a single step. > > - Lao Tzu"", > ""Welke stap kun je vandaag zetten, > om dat verre doel te bereiken?"" > ]""2018-07-07"

Re: [sqlite] To use or not to use single quotes with integers

2018-04-12 Thread Simon Slavin
On 12 Apr 2018, at 7:49pm, Thomas Kurz wrote: > [Simon Slavin wrote] > >> A similar thing happens when you specify that a column has affinity of REAL. >> In both cases, SQLite considers that the CREATE command knows better than >> whatever specifies the value, and does the conversion. Howeve

Re: [sqlite] To use or not to use single quotes with integers

2018-04-12 Thread David Raymond
users-boun...@mailinglists.sqlite.org] On Behalf Of Thomas Kurz Sent: Thursday, April 12, 2018 2:50 PM To: SQLite mailing list Subject: Re: [sqlite] To use or not to use single quotes with integers Dear Simon, > A similar thing happens when you specify that a column has affinity of REAL. &g

Re: [sqlite] To use or not to use single quotes with integers

2018-04-12 Thread Thomas Kurz
Dear Simon, > A similar thing happens when you specify that a column has affinity of REAL. > In both cases, SQLite considers that the CREATE command knows better than > whatever specifies the value, and does the conversion. However for the > number to be stored the conversion has to be revers

Re: [sqlite] To use or not to use single quotes with integers

2018-04-10 Thread Markos
Thanks Simon and David for your attention, Markos Insert the usual "Bobby Tables" reply here https://xkcd.com/327/ You really want to just

Re: [sqlite] To use or not to use single quotes with integers

2018-04-09 Thread David Raymond
Insert the usual "Bobby Tables" reply here https://xkcd.com/327/ You really want to just bind the values to the insert statement, both to prevent issues and make things simpler. It'll look slightly different in each language, but it's basically 1 SQL statement text which contains placeholders.

Re: [sqlite] To use or not to use single quotes with integers

2018-04-08 Thread Simon Slavin
On 8 Apr 2018, at 11:54am, Markos wrote: > CREATE TABLE foods( > id integer PRIMARY KEY, > type_id integer, > name text ); > > I can insert type_id without single quote: > > INSERT INTO foods (name, type_id) VALUES ('Rice', 16); > > And also with single quote: > > INSERT INTO foods (name,

Re: [sqlite] to encrypt sqlite db

2013-09-02 Thread Yuriy Kaminskiy
Etienne wrote: > - Original message - > From: Paolo Bolzoni > To: General Discussion of SQLite Database > Subject: Re: [sqlite] to encrypt sqlite db > Date: Sun, 1 Sep 2013 18:24:13 +0200 >> On Sun, Sep 1, 2013 at 6:10 PM, Etienne wrote: >>>> On Su

Re: [sqlite] to encrypt sqlite db

2013-09-02 Thread Yuriy Kaminskiy
Ulrich Telle wrote: > Am 31.08.2013 22:01, schrieb Etienne: On Sat, 31 Aug 2013 17:17:23 +0200 Etienne wrote: > > On the other hand removing patterns definitely cannot hurt. > > Precisely. > > The very first bytes of SQLite files are, AFAI

Re: [sqlite] to encrypt sqlite db

2013-09-02 Thread Clemens Ladisch
Ulrich Telle wrote: > Am 02.09.2013 06:11, schrieb Etienne: >> wxSQLite3 does implement AES in ECB mode > > Wrong. CBC mode is used. Inside one page. If we ignored the actual block size, and viewed the entire database as a stream to be encrypted by a cipher with a block size identical with the pa

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Ulrich Telle
Am 02.09.2013 06:11, schrieb Etienne: wxSQLite3 does implement AES in ECB mode Wrong. CBC mode is used. Regards, Ulrich ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Etienne
On Sun, Sep 1, 2013, at 19:59, Ulrich Telle wrote: > Am 01.09.2013 18:40, schrieb Etienne: > > wxSQLite is free, while SEE is definitively not. > > The original poster searched for a free encryption extension, of which > there exist several: System.Data.SQLite (RC4), wxSQLite3 (AES-128 or > AES-

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Ulrich Telle
Am 01.09.2013 18:40, schrieb Etienne: wxSQLite is free, while SEE is definitively not. The original poster searched for a free encryption extension, of which there exist several: System.Data.SQLite (RC4), wxSQLite3 (AES-128 or AES-256), SQLCipher (AES-256 with nonce) to name a few. Dependin

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Ulrich Telle
Am 01.09.2013 17:50, schrieb Clemens Ladisch: Without a random IV/nonce, every page is guaranteed to encrypt to the same data if the contents and the key have not changed. Thus, wxSQLite3 gives an attacker the ability to determine whether any particular page has changed, by comparing the old and

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Etienne
olzoni To: General Discussion of SQLite Database Subject: Re: [sqlite] to encrypt sqlite db Date: Sun, 1 Sep 2013 18:24:13 +0200 Another weird sentence in the mailing list of probably most used DB that is really free. On Sun, Sep 1, 2013 at 6:10 PM, Etienne wrote: > On Sun, Sep 1, 2013, at 1

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Paolo Bolzoni
Another weird sentence in the mailing list of probably most used DB that is really free. On Sun, Sep 1, 2013 at 6:10 PM, Etienne wrote: > On Sun, Sep 1, 2013, at 17:50, Clemens Ladisch wrote: >> Ulrich Telle wrote: >> > Am 31.08.2013 22:01, schrieb Etienne: >> >> I simply wanted to warn the OP th

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Etienne
On Sun, Sep 1, 2013, at 17:50, Clemens Ladisch wrote: > Ulrich Telle wrote: > > Am 31.08.2013 22:01, schrieb Etienne: > >> I simply wanted to warn the OP that wxSQLite, while free, does NOT use > >> salts: > > > > Well, that's not completely true. The encryption extension coming with > > wxSQLite3

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Clemens Ladisch
Ulrich Telle wrote: > Am 31.08.2013 22:01, schrieb Etienne: >> I simply wanted to warn the OP that wxSQLite, while free, does NOT use >> salts: > > Well, that's not completely true. The encryption extension coming with > wxSQLite3 uses a different IV (initial vector) for each database page. > True

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Mohit Sindhwani
On 31/8/2013 9:52 PM, dd wrote: Thank you for your quick response. I am looking for freeware. If freeware not available, I have to implement encryption support for sqlite on winrt. What is the procedure to implement encryption support on winrt? Thanks, dd Many others have replied with the co

Re: [sqlite] to encrypt sqlite db

2013-09-01 Thread Ulrich Telle
Am 31.08.2013 22:01, schrieb Etienne: On Sat, 31 Aug 2013 17:17:23 +0200 Etienne wrote: > > On the other hand removing patterns definitely cannot hurt. > > Precisely. > > The very first bytes of SQLite files are, AFAIK, well known. That's what salt is for, no? "nonce", "IV",

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread j . merrill
hat, otherwise the encryption would not be very useful. [quoted message from Paolo Bolzoni] Date: Sat, 31 Aug 2013 14:40:19 +0200 From: Paolo Bolzoni Subject: Re: [sqlite] to encrypt sqlite db Message-ID:   There is a non-free version of sqlite that encrypt the db. If it is that you want the

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Mikael
Wait, can you clarify what you mean by SEE here, and also which library you mean for BW? Thanks 2013/8/31 Etienne > > Those first few bytes are just as well known after they have been run > > through zlib or libbz2 or whatever compression library you are using. > Your > > encryption algorithm,

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Etienne
> > On Sat, 31 Aug 2013 17:17:23 +0200 > > Etienne wrote: > > > > > > On the other hand removing patterns definitely cannot hurt. > > > > > > Precisely. > > > > > > The very first bytes of SQLite files are, AFAIK, well known. > > > > That's what salt is for, no? > > > "nonce", "IV", "sa

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Richard Hipp
On Sat, Aug 31, 2013 at 1:10 PM, James K. Lowden wrote: > On Sat, 31 Aug 2013 17:17:23 +0200 > Etienne wrote: > > > > On the other hand removing patterns definitely cannot hurt. > > > > Precisely. > > > > The very first bytes of SQLite files are, AFAIK, well known. > > That's what salt is for, no

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread James K. Lowden
On Sat, 31 Aug 2013 17:17:23 +0200 Etienne wrote: > > On the other hand removing patterns definitely cannot hurt. > > Precisely. > > The very first bytes of SQLite files are, AFAIK, well known. That's what salt is for, no? --jkl ___ sqlite-users

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Etienne
> Those first few bytes are just as well known after they have been run > through zlib or libbz2 or whatever compression library you are using.  Your > encryption algorithm, whatever it is, needs to be resistant to a > known-plaintext attack. LZ is a sequential algorithm, while BW works with large

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Richard Hipp
On Sat, Aug 31, 2013 at 11:17 AM, Etienne wrote: > > The very first bytes of SQLite files are, AFAIK, well known. > Those first few bytes are just as well known after they have been run through zlib or libbz2 or whatever compression library you are using. Your encryption algorithm, whatever it i

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Etienne
> That last sentence is quite weird, a good encryption system should > give a random-like sequence even with very low-entropy input. > > On the other hand removing patterns definitely cannot hurt. Precisely. The very first bytes of SQLite files are, AFAIK, well known. While "encryption-only" p

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Paolo Bolzoni
That last sentence is quite weird, a good encryption system should give a random-like sequence even with very low-entropy input. On the other hand removing patterns definitely cannot hurt. On Sat, Aug 31, 2013 at 4:38 PM, Etienne wrote: >> Thank you for your quick response. >> >> I am looking fo

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Etienne
> Thank you for your quick response. > > I am looking for freeware. If freeware not available, I have to implement > encryption support for sqlite on winrt. > > What is the procedure to implement encryption support on winrt? > > Thanks, > dd

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Eric Sink
SQLCipher is free. But it's not compatible with WinRT. I'm pretty sure that right now there is nothing that meets both of your requirements. -- E On Aug 31, 2013, at 8:52 AM, dd wrote: > Thank you for your quick response. > > I am looking for freeware. If freeware not available, I have to

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread dd
Thank you for your quick response. I am looking for freeware. If freeware not available, I have to implement encryption support for sqlite on winrt. What is the procedure to implement encryption support on winrt? Thanks, dd On Sat, Aug 31, 2013 at 6:34 PM, Stephan Beal wrote: > On Sat, Aug 3

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Stephan Beal
On Sat, Aug 31, 2013 at 2:59 PM, Mohit Sindhwani wrote: > Adding on to Paolo's answer, see this: http://www.hwaci.com/sw/** > sqlite/prosupport.html > See SEE and CEROD on that page. > @devs: minor typo on that page: "The SQLite software free and

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Mohit Sindhwani
On 31/8/2013 8:40 PM, Paolo Bolzoni wrote: There is a non-free version of sqlite that encrypt the db. If it is that you want then you have to contact them directly. Otherwise just use sqlite on a EncFs mounted disk? Adding on to Paolo's answer, see this: http://www.hwaci.com/sw/sqlite/prosup

Re: [sqlite] to encrypt sqlite db

2013-08-31 Thread Paolo Bolzoni
There is a non-free version of sqlite that encrypt the db. If it is that you want then you have to contact them directly. Otherwise just use sqlite on a EncFs mounted disk? On Sat, Aug 31, 2013 at 2:25 PM, dd wrote: > Hi All, > > I have to encrypt sqlite database on winrt. > > What are all t

Re: [sqlite] To BEGIN or not to BEGIN. That is the question...

2013-08-29 Thread Doug Nebeker
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Wednesday, August 28, 2013 5:44 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] To BEGIN or not to BEGIN. That is the question... On 8/28/2013 6:28 PM, jose

Re: [sqlite] To BEGIN or not to BEGIN. That is the question...

2013-08-28 Thread Igor Tandetnik
On 8/28/2013 6:28 PM, jose isaias cabrera wrote: I know that if I am doing INSERTs and such, I need to, BEGIN; INSERT... END; No, you don't need to. You can, if you want to, but there's no reason to have to. But, do I need to begin if I am going to create a table? ie. BEGIN; CRE

Re: [sqlite] To import csv file in C#

2013-02-10 Thread Brad Hards
On 09/02/13 13:49, mukesh kumar mehta wrote: Is there any option to import csv file into sqlite database with the help of System.Data.Sqlite.dll. As like shell command ".import file_name table_name". SpatiaLite can do this (either as a virtual table, or an import). There are probably other exten

Re: [sqlite] To import csv file in C#

2013-02-09 Thread Simon Slavin
On 9 Feb 2013, at 2:49am, mukesh kumar mehta wrote: > Is there any option to import csv file into sqlite database with the help > of System.Data.Sqlite.dll. > As like shell command ".import file_name table_name". > > As like "bulk insert" which uses in sqlserver. > As like "Load Data" which use

Re: [sqlite] to find table exists or not

2012-12-06 Thread kyan
On Thu, Dec 6, 2012 at 6:49 PM, Staffan Tylen wrote: > SELECT CASE WHEN EXISTS (...) END > > On Thu, Dec 6, 2012 at 5:47 PM, Durga D wrote: > >> I have situation in which I want to read particular record if table exists. >> Based on that record information, I have to execute some logic on other >

Re: [sqlite] to find table exists or not

2012-12-06 Thread Igor Tandetnik
On 12/6/2012 11:47 AM, Durga D wrote:> I have situation in which I want to read particular record if table exists. Based on that record information, I have to execute some logic on other tables of the same database. If record doesn't exist I need to create new table. Prepare a statement to read

Re: [sqlite] to find table exists or not

2012-12-06 Thread Staffan Tylen
lt while keeping pre-set values) > > > > > > -Ursprüngliche Nachricht- > > > Von: Stephen Chrzanowski [mailto:pontia...@gmail.com] > > > Gesendet: Donnerstag, 06. Dezember 2012 11:21 > > > An: General Discussion of SQLite Database > > > B

Re: [sqlite] to find table exists or not

2012-12-06 Thread Durga D
> > INSERT OR IGNORE INTO ... > > (set missing options to default while keeping pre-set values) > > > > -Ursprüngliche Nachricht- > > Von: Stephen Chrzanowski [mailto:pontia...@gmail.com] > > Gesendet: Donnerstag, 06. Dezember 2012 11:21 > > An:

Re: [sqlite] to find table exists or not

2012-12-06 Thread Dave McKee
t values) > > -Ursprüngliche Nachricht- > Von: Stephen Chrzanowski [mailto:pontia...@gmail.com] > Gesendet: Donnerstag, 06. Dezember 2012 11:21 > An: General Discussion of SQLite Database > Betreff: Re: [sqlite] to find table exists or not > > I can think of two reasons

Re: [sqlite] to find table exists or not

2012-12-06 Thread Hick Gunter
: Stephen Chrzanowski [mailto:pontia...@gmail.com] Gesendet: Donnerstag, 06. Dezember 2012 11:21 An: General Discussion of SQLite Database Betreff: Re: [sqlite] to find table exists or not I can think of two reasons why you wouldn't want to blindly delete the table, but verify that it exists. -

Re: [sqlite] to find table exists or not

2012-12-06 Thread Stephen Chrzanowski
I can think of two reasons why you wouldn't want to blindly delete the table, but verify that it exists. - First run of the program that creates the database from square one. If the table exists, skip over the create routine and continue. I routinely do this for creating an Options database (Pro

Re: [sqlite] to find table exists or not

2012-12-05 Thread Hick Gunter
Why do you only want to see if the table is there? You can always do DROP TABLE IF EXISTS ... CREATE TABLE ... to replace the definition or CREATE TABLE IF NOT EXISTS ... to keep the old definition. -Ursprüngliche Nachricht- Von: Durga D [mailto:durga.d...@gmail.com] Gesendet: Mittwoc

Re: [sqlite] to find table exists or not

2012-12-05 Thread Simon Slavin
On 5 Dec 2012, at 2:33pm, Durga D wrote: > I just want to find whether table exists or not in a database. > > > Is it correct query? > > > select distinct tbl_name from sqlite_master where tbl_name = 'abc'; This may return zero lines or many. Because indexes and other pieces of informatio

Re: [sqlite] to table update

2012-08-23 Thread Rob Richardson
lf Of Igor Tandetnik Sent: Thursday, August 23, 2012 9:12 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] to table update yanhong.ye wrote: > update tb1 set col1=(select col1 from tb2 ) where tb1.co2=tb2.co2; The closing parenthesis is in the wrong place: update tb1 set col1=(select col1 f

Re: [sqlite] to table update

2012-08-23 Thread Igor Tandetnik
yanhong.ye wrote: > update tb1 set col1=(select col1 from tb2 ) where tb1.co2=tb2.co2; The closing parenthesis is in the wrong place: update tb1 set col1=(select col1 from tb2 where tb1.co2=tb2.co2); -- Igor Tandetnik ___ sqlite-users mailing list s

Re: [sqlite] to table update

2012-08-23 Thread Rob Richardson
Are you certain there exist rows in tb1 and tb2 that satisfy the condition? What happens when you try? Is any error message or number returned? Can you run the same query inside an SQLite management tool like SQLite Spy? Does it work there? Please provide us ALL of the relevant information

Re: [sqlite] to joe mistachkin - Ticket 4bbf851fa5

2012-04-13 Thread Simon Hucksley
on http://www.sqlite.org/src/wiki?name=Bug+Reports I read "The idea is that bug reports can be filtered on the mailing list and those that are actual new bugs can be transferred into our bug tracking system by registered developers. * Anonymous users can continue to append comments to existing b

Re: [sqlite] to joe mistachkin - Ticket 4bbf851fa5

2012-04-12 Thread Joe Mistachkin
Simon Hucksley wrote: > > since weeks I'm not able to edit the ticket as anonymous. > the edit button is missing on the menu. > Unfortunately, the ability to edit tickets anonymously had to be disabled. > > to ticket 4bbf851fa5 > > It's the same old story: > after updating some hundred reco

Re: [sqlite] To index or not to index?

2011-06-13 Thread Black, Michael (IS)
Ummm...wouldn't it be a whole lot simpler and faster to have an "Online" table? One id is all that's needed unless you want other info. Then you're just inserting and deleting records and the whole table is "online" at any moment. I don't see any reason why this online status needs to be smashe

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 8:46 AM, Richard Hipp wrote: > That depends on what fraction of entries have isOnline=1.  If isOnline is > rare, then an index might be helpful.  But if roughly have the entires have I wondered about that. > It seems to me, though, that you are committing the classic erro

Re: [sqlite] To index or not to index?

2011-06-13 Thread Richard Hipp
On Mon, Jun 13, 2011 at 6:51 AM, Ian Hardingham wrote: > Hey guys, once again sorry for spamming at the moment. > > This is a simple question. > > My user account table has a field "isOnline INT". This table has, say, > 100,000 rows. > > Every ten seconds I need to compile a list of all users wh

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 7:51 AM, Ian Hardingham wrote: > Hey guys, once again sorry for spamming at the moment. > > This is a simple question. > > My user account table has a field "isOnline INT".  This table has, say, > 100,000 rows. My understanding is that if the number of possible values in a

Re: [sqlite] To close or not to close

2010-11-06 Thread Richard Hipp
On Fri, Nov 5, 2010 at 2:47 PM, Chris Vernor wrote: > I am fairly new to the SQLite world, and have a quick question: > > > > I have an application that migrates files form a windows environment to > a solaris environment, and it can be run multi-threaded. I have seen > several articles that show

Re: [sqlite] to get 2 records after a special records. But wrong count, the count is 5

2010-03-22 Thread P Kishor
On Mon, Mar 22, 2010 at 12:51 AM, liubin liu <7101...@sina.com> wrote: > > Thanks, I've gotten the point, :) > > and the next question is that how to know the true count after a special > record while getting a special number records. > > It is not clear at all what you are asking. I am assuming t

Re: [sqlite] to get 2 records after a special records. But wrong count, the count is 5

2010-03-22 Thread Igor Tandetnik
liubin liu wrote: > and the next question is that how to know the true count after a special > record while getting a special number records. I'm not sure I quite understand what you are trying to do. See if this is close: SELECT max(COUNT(*), 2) FROM t1 WHERE id>=3; Though it's not clear why on

Re: [sqlite] to get 2 records after a special records. But wrong count, the count is 5

2010-03-21 Thread liubin liu
Thanks, I've gotten the point, :) and the next question is that how to know the true count after a special record while getting a special number records. P Kishor-3 wrote: > > On Sun, Mar 21, 2010 at 9:19 PM, liubin liu <7101...@sina.com> wrote: >> >> >> my application is like below. To get 2

Re: [sqlite] to get 2 records after a special records. But wrong count, the count is 5

2010-03-21 Thread P Kishor
On Sun, Mar 21, 2010 at 9:19 PM, liubin liu <7101...@sina.com> wrote: > > > my application is like below. To get 2 records after a special records. But > wrong count, the count is 5: > sqlite> > sqlite> CREATE TABLE t1 (id INTEGER PRIMARY KEY, data INTEGER); > sqlite> INSERT INTO t1 VALUES (3, 999)

RE: [sqlite] To increase search speed

2007-08-20 Thread Samuel R. Neff
Method 3, normalization, is the right route but I think the implementation needs a little more work. First don't store both Artist ID and Artist Name in the Music table--only store the ID. This goes for AlbumID/Name and GenreID/Name as well. Then reorder the columns to put the integers first in

RE: [sqlite] To increase search speed

2007-08-20 Thread Sreedhar.a
Thanks Raghavendra, We use sqlite statements for search. Best Regards, A.Sreedhar. -Original Message- From: RaghavendraK 70574 [mailto:[EMAIL PROTECTED] Sent: Saturday, August 18, 2007 10:13 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] To increase search speed use sqlite

Re: [sqlite] To increase search speed

2007-08-18 Thread Ken
I think method 3 shows the best promise: Obviously M4 is out since it is in memory only. Besides caching should help improve the performance. The qustion that begs to be asked is: What are your performance goals? And what are your performance numbers ie timings for each of the mehtods

Re: [sqlite] To increase search speed

2007-08-18 Thread RaghavendraK 70574
use sqlite statements. regards ragha ** This email and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of

Re: [sqlite] to retreive OID

2006-09-15 Thread Dennis Cote
Roger Binns wrote: Alternately, you may want to consider the simpler sqlite3_exec api Roger, The sqlite3_exec interface may seem simpler than the sqlite_prepare et al API at first glance, but it really isn't for queries. Yes you make fewer calls to sqlite functions, but you have to define

Re: [sqlite] to retreive OID

2006-09-14 Thread Roger Binns
abiramip wrote: > Hi, > In the command prompt if i give the following, > select OID from tablename; > am able to get the corresponding OID... > If i use sqlite3_prepare() APIhow do i proceed inorder to do the same ? > > Please suggest a procedure to perform this. Look at this page: http:/

Re: [sqlite] to retrieve OID

2006-09-14 Thread Dennis Cote
abiramip wrote: In the command prompt if i give the following, select OID from tablename; am able to get the corresponding OID... Is it possible to do the same by using APIs?If so which API can i use inorder to retreive OID from a table. Can i use sqlite3_get_table() or sqlite3_prepare() APIs

Re: [sqlite] To whom to inform on a bug?

2006-02-14 Thread drh
Kirill <[EMAIL PROTECTED]> wrote: > version: > 3.3.4 or 3.x > > System test: > Win2003(NTFS) > > Script: > select * from tResult where tex like '%ra%' > result = 0 > > select tex from tResult where id = 3229 > tex = "...Oracle..." > > Soft on broblem: > sqlite3explorer, > and m

Re: [sqlite] To whom to inform on a bug?

2006-02-14 Thread drh
Kirill <[EMAIL PROTECTED]> wrote: > hello > > select * from tResult where tex like '%ra%' > result = 0 > > select tex from tResult where id = 3229 > tex = "...Oracle..." > http://www.sqlite.org/cvstrac/tktnew Hints: Unless you provide more information that you have shown above, your ticket w

Re: [sqlite] To 'sqlite3_step' or not to 'sqlite3_step' as is the case...

2005-10-18 Thread Terry MacDonald
Dan Kennedy wrote: My hunch is that you need to change the while() line to: while ( (rc = sqlite3_step(pStmt)) != SQLITE_DONE ) But I could be wrong, and I don't have a computer with a C compiler to test this right now. Terence MacDonald <[EMAIL PROTECTED]> wrote: The following code is p

Re: [sqlite] To 'sqlite3_step' or not to 'sqlite3_step' as is the case...

2005-10-17 Thread John Stanton
This works - ... just after database is opened, compile the SQL statement if (sqlite3_prepare(db, dbst_cart_wt_in_sel, -1, &dbcmp_cart_wt_in_sel, &dbend_cart_wt_in_sel) != SQLITE_OK) { errormet("908", (char *)sqlite3_errmsg(d

Re: [sqlite] To 'sqlite3_step' or not to 'sqlite3_step' as is the case...

2005-10-17 Thread Dan Kennedy
My hunch is that you need to change the while() line to: while ( (rc = sqlite3_step(pStmt)) != SQLITE_DONE ) But I could be wrong, and I don't have a computer with a C compiler to test this right now. Terence MacDonald <[EMAIL PROTECTED]> wrote: The following code is part of a class membe