Re: [sqlite] Updating Local and SharedDBs

2009-02-24 Thread jose isaias cabrera
"jose isaias cabrera" wrote... > > Greetings. My apologies for the lengthiness... > > We are running an utility with about 5 clients using two DBs: > 1. PrimaryPC > 2. Shared folder > > The PrimaryPC contains the original data and changes, while the SharedDB > in > the Shared Folder is the one

Re: [sqlite] SAVEPOINT : Seems don't work

2009-02-24 Thread Dan
On Feb 25, 2009, at 2:31 AM, REPKA_Maxime_NeufBox wrote: > I try for test as follow : > > on DOS : sqlite3.exe Database > > then type : SAVEPOINT spoint; > Error message is : 'SQL error :near "savepoint": syntax error' Probably you need to upgrade. SAVEPOINT first appeared in 3.6.8. Dan. _

Re: [sqlite] SQL error: no such function: replace

2009-02-24 Thread BenJones12345
Ah... its version 3.3.5 Unfortunately though I don't have the option of updating it, since I am using it on a very widespread set of machines which I don't have root privileges on... Is there another way I can achieve the same effect without this function? Thankyou both for your awesomely fast

Re: [sqlite] SQL error: no such function: replace

2009-02-24 Thread John Machin
On 25/02/2009 1:13 PM, BenJones12345 wrote: > Hi all > > I'm very much a beginner with sqlite3 and and I'm completely stumped with > using the replace function. > > What I have is a field (TheOldField) with values like: > > HM1 > HP4 > HM3 > HM2 > > and I need to replace all "P" with "+" and al

Re: [sqlite] SQL error: no such function: replace

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 8:13 PM, BenJones12345 wrote: > > Hi all > > I'm very much a beginner with sqlite3 and and I'm completely stumped with > using the replace function. > > What I have is a field (TheOldField) with values like: > > HM1 > HP4 > HM3 > HM2 > > and I need to replace all "P" with "

[sqlite] SQL error: no such function: replace

2009-02-24 Thread BenJones12345
Hi all I'm very much a beginner with sqlite3 and and I'm completely stumped with using the replace function. What I have is a field (TheOldField) with values like: HM1 HP4 HM3 HM2 and I need to replace all "P" with "+" and all "M" with "-", and put the result into a new field (TheNewField). A

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 11:34 AM, P Kishor wrote: > On Tue, Feb 24, 2009 at 6:12 PM, John Machin wrote: >> On 25/02/2009 10:30 AM, P Kishor wrote: >>> On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag >>> wrote: Hallo, I'm trying to insert the highest value of tblName into tblZO. There

Re: [sqlite] a question on the callback function's return values of sqlite3_exec()

2009-02-24 Thread liubin liu
Thank you very much! this is my first time to use sqlite3. using prepared statements is a little difficult. Could I avert to another way(more simple way) to achieve the same thing? Or where could I get some example codes on the method of using prepared statements? Igor Tandetnik wrote: > > "l

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 6:12 PM, John Machin wrote: > On 25/02/2009 10:30 AM, P Kishor wrote: >> >> On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag >> wrote: >>> >>> Hallo, >>> >>> I'm trying to insert the highest value of tblName into tblZO. >>> >>> There fore I followed the hints in this article .

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 10:30 AM, P Kishor wrote: > On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag wrote: >> Hallo, >> >> I'm trying to insert the highest value of tblName into tblZO. >> >> There fore I followed the hints in this article ... >> http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-r

[sqlite] Updating Local and SharedDBs

2009-02-24 Thread jose isaias cabrera
Greetings. My apologies for the lengthiness... We are running an utility with about 5 clients using two DBs: 1. PrimaryPC 2. Shared folder The PrimaryPC contains the original data and changes, while the SharedDB in the Shared Folder is the one that provides original indexing of those records.

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 5:35 PM, John Machin wrote: > On 25/02/2009 10:19 AM, Leo Freitag wrote: >> Hallo, >> >> I'm trying to insert the highest value of tblName into tblZO. >> >> There fore I followed the hints in this article ... >> http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserte

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 10:19 AM, Leo Freitag wrote: > Hallo, > > I'm trying to insert the highest value of tblName into tblZO. > > There fore I followed the hints in this article ... > http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514.html#a190

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread Igor Tandetnik
Leo Freitag wrote: > sqlite> insert into 'tblRefMaxName' Values (select max(id) from > tblName, 'eins') > ; insert into tblRefMaxName select max(id), 'eins' from tblName; Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag wrote: > > Hallo, > > I'm trying to insert the highest value of tblName into tblZO. > > There fore I followed the hints in this article ... > http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514

[sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread Leo Freitag
Hallo, I'm trying to insert the highest value of tblName into tblZO. There fore I followed the hints in this article ... http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514.html#a19085514 ... but I got a error (see below) SQLite versi

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread Alexey Pechnikov
Hello! On Monday 23 February 2009 23:54:56 pyt...@bdurham.com wrote: > Are there any plans to enhance SQLite to support some of Oracle's > parallel processing or partitioning capabilities? But Oracle does not database for "cloud computing". You can't get no-installable and no-administrate Oracle

Re: [sqlite] Using result of subquery both as value and conditional test...

2009-02-24 Thread Hoover, Jeffrey
use the coalesce function coalesce(xxx,'A') returns 'A' if xxx is null, otherwise returns the value of xxx (but remember that '' is NOT null in SQLite). coalesce((select y_value from y where y_id = x_id),'darn') replaces your case statement -Original Message- From: sqlite-users-boun...@s

Re: [sqlite] Using result of subquery both as value and conditional test...

2009-02-24 Thread John Machin
On 25/02/2009 6:15 AM, John Elrick wrote: > I may be overlooking something obvious, however, I cannot discern from > the documentation if this is possible. > > given a simple example: > > create table x (x_id integer); > create table y (y_id integer, y_value varchar); > > insert into x values (

Re: [sqlite] SAVEPOINT : Seems don't work

2009-02-24 Thread REPKA_Maxime_NeufBox
I try for test as follow : on DOS : sqlite3.exe Database then type : SAVEPOINT spoint; Error message is : 'SQL error :near "savepoint": syntax error' I tried 'spoint', "spoint", (spoint), ('spoint'), ("spoint") : no syntax works With same test it works with Begin, commit and rollback -Mess

Re: [sqlite] Using result of subquery both as value and conditional test...

2009-02-24 Thread John Elrick
D. Richard Hipp wrote: > On Feb 24, 2009, at 2:15 PM, John Elrick wrote: > > SNIP >> >> Is there any way to eliminate the second (select y_value from y where >> y_id = x_id)? If so, what would the query look like? >> >> > > SELECT coalesce((SELECT y_value FROM y WHERE y_id=x_id), 'darn')

Re: [sqlite] Using result of subquery both as value and conditional test...

2009-02-24 Thread D. Richard Hipp
On Feb 24, 2009, at 2:15 PM, John Elrick wrote: > I may be overlooking something obvious, however, I cannot discern from > the documentation if this is possible. > > given a simple example: > > create table x (x_id integer); > create table y (y_id integer, y_value varchar); > > insert into x valu

[sqlite] Using result of subquery both as value and conditional test...

2009-02-24 Thread John Elrick
I may be overlooking something obvious, however, I cannot discern from the documentation if this is possible. given a simple example: create table x (x_id integer); create table y (y_id integer, y_value varchar); insert into x values (1); insert into x values (2); insert into y values (1, 'Hell

Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-24 Thread Jay A. Kreibich
> Richard, > > This is fascinating. To quote a bit from "The Definitive Guide to SQLite" by Michael Owens: SQLite was conceived on a battleship... well, sort of. SQLite's author, D. Richard Hipp, was working for General Dynamics on a program for the U.S. Navy developing sof

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread Jay A. Kreibich
On Mon, Feb 23, 2009 at 10:34:50PM -0500, pyt...@bdurham.com scratched on the wall: > Hi Billy, > > >> Are there any plans to enhance SQLite to support some of Oracle's > >> parallel processing or partitioning capabilities? > > > I realized that you're asking Richard, and not the peanut gallery,

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 8:19 AM, Allan Edwards wrote: > I must trade my works for currency.  "Will Code for FOOD" : - )  I > consult and architect systems professionally and really can't afford > to do much free work.  As much as I love to develop solutions, we are > not in the Star Trek age o

Re: [sqlite] How to size and position a scrollbar within a virtual listview

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 3:16 AM, Mail.sqlite wrote: > > Hi All, > I searched trough many messages and docs but did not find a solution to this > trivial looking problem. It would be really nice if someone could point me > into the right direction. > > my ToDo: > I have to use a virtual listview

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 12:25 AM, Allan Edwards wrote: .. > > I have personally written a socket based server on top of the database > and it works very well.  So I have actually scaled the database myself > as I preached in this email.  Don't be a WIMP and map shares to share > a database... writ

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 7:44 AM, Yuzem wrote: > > > > P Kishor-3 wrote: >> Google for "normalizing a database" and then read up on it. It will help. >> > > Ok, thanks, thats the solution. Now there is another problem that arise. > Lets say I have a table called movies with 3 columns (id, titles, k

Re: [sqlite] Sqlite question: group by column with multiple tags?

2009-02-24 Thread Yuzem
P Kishor-3 wrote: > Google for "normalizing a database" and then read up on it. It will help. > Ok, thanks, thats the solution. Now there is another problem that arise. Lets say I have a table called movies with 3 columns (id, titles, keywords): 1|title1|keyword1 1|title1|keyword2 1|title1|k

Re: [sqlite] How to delete the rows which is the result of Select operation of another table?

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 7:23 AM, Pramoda M. A wrote: > Dear All, > > > > I have to delete the rows of one table table but key is the result of > select operation of another table? > > > > Delete from table1 where ID = ( > > > Select ID from table2 where name like '%sqlite%'); > > > > Is it ok? >

Re: [sqlite] How to delete the rows which is the result of Selectoperation of another table?

2009-02-24 Thread Igor Tandetnik
"Pramoda M. A" wrote in message news:f7846b8f3c78c049b6a1dff861f6c16f0362f...@kcinblrexb01.kpit.com > I have to delete the rows of one table table but key is the result of > select operation of another table? > > > > Delete from table1 where ID = ( > > > Select ID from table2 where name like '%sql

[sqlite] How to delete the rows which is the result of Select operation of another table?

2009-02-24 Thread Pramoda M. A
Dear All, I have to delete the rows of one table table but key is the result of select operation of another table? Delete from table1 where ID = ( Select ID from table2 where name like '%sqlite%'); Is it ok? With Regards Pramoda.M.A KPIT Cummins Infosystems Limited | Bengalu

Re: [sqlite] a question on the callback function's return values of sqlite3_exec()

2009-02-24 Thread Igor Tandetnik
"liubin liu" <7101...@sina.com> wrote in message news:22176984.p...@talk.nabble.com > the question is on the callback function's return values of > sqlite3_exec() > > when using sqlite3_exec() to do "select * from ...", how to get all > the return values by using the callback function? > > it could

Re: [sqlite] How to Select using Wild Characters?

2009-02-24 Thread Igor Tandetnik
"Pramoda M. A" wrote in message news:f7846b8f3c78c049b6a1dff861f6c16f0362e...@kcinblrexb01.kpit.com > I have to select using wild charcters? How to do it? > > For eg: I have to select field which should contain "sqlite"... Then > *sqlite* is not working... select * from mytable where somefield li

Re: [sqlite] How to Select using Wild Characters?

2009-02-24 Thread Mihai Limbasan
Use % (percent instead of * and use _ (underscore) instead of ? Pramoda M. A wrote: > Hi All, > > > > I have to select using wild charcters? How to do it? > > For eg: I have to select field which should contain "sqlite"... Then > *sqlite* is not working... > > Pleas help me. > > > > With Regar

[sqlite] How to Select using Wild Characters?

2009-02-24 Thread Pramoda M. A
Hi All, I have to select using wild charcters? How to do it? For eg: I have to select field which should contain "sqlite"... Then *sqlite* is not working... Pleas help me. With Regards Pramoda.M.A KPIT Cummins Infosystems Limited | Bengaluru | Board: +91 80 30783905

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread Allan Edwards
I wanted to throw out a few more points about being parallel and scalable in terms of data storage? What is the reason we want to be this way? Well, for tons of users and to mitigate risk across lots of machines. Yes, out of the box the value that Oracle provides is of a designation that satisfi

Re: [sqlite] SQLite vs. Oracle (parallelized)

2009-02-24 Thread Allan Edwards
Actually, Oracle boots pretty fast and once it is booted up, it is SUPER fast on insertion. I have used the following databases professionally for years * MS SQL Server * MS SQL Server Embedded * MS Access * Oracle (numerous versions) * MySQL (multiple versions) * Objectivity * PostgreSQL * Sqlit

Re: [sqlite] Sqlite optim

2009-02-24 Thread Jérôme Loyet
> On Monday 23 February 2009 13:09:58 Jérôme Loyet wrote: >> My questions: >> 1- Is there a better way to populate the `siblings` table ? (optimize >> my sql request) > > You may use compose index on (cookie,referer,date) and REAL datatype for > dates. I choosed integer for the date as everything

[sqlite] How to size and position a scrollbar within a virtual listview

2009-02-24 Thread Mail.sqlite
Hi All, I searched trough many messages and docs but did not find a solution to this trivial looking problem. It would be really nice if someone could point me into the right direction. my ToDo: I have to use a virtual listview for a database with some medium and large tables. I would give th