[sqlite] help with sql query / command SUM

2008-01-13 Thread Jorge Pereira
Hi folks! I Have two tables, and i need access data from both. below it's my tables; CREATE TABLE Product ( CD_PROD INTEGER CONSTRAINT PK_PROD NOT NULL PRIMARY KEY AUTOINCREMENT, CD_REMT_COMM INTEGER CONSTRAINT FK_PROD_REMT_COMM REFERENCES Remote_command(CD_REMT_COMM), CD_IDEN_P

Re: [sqlite] Help with C API - sqlite3 - SOLVED

2007-12-02 Thread Jonathan Hendler
The slowness had something to do with the way I was compiling. I'm new to GCC and on MacOSX. I was compiling with dmalloc, and gdb for debugging - (-ggdb -DDMALLOC -DDMALLOC_FUNC_CHECK ) but even when I removed those I experienced the same issues. Why? Who knows - my test code also used Cutest, an

Re: [sqlite] Help with C API - sqlite3

2007-12-02 Thread Jonathan Hendler
Thank you, I'm working on updating the code now. http://www.sqlite.org/c3ref/free_table.html does not mention it was depricated and the page was updated 3 days ago. Am I looking in the wrong place? John Stanton wrote: > Using the deprecated API get_table is very likely the problem. > > Jonathan H

Re: [sqlite] Help with C API - sqlite3

2007-12-02 Thread John Stanton
Using the deprecated API get_table is very likely the problem. Jonathan Hendler wrote: Hi All, I'm writing a C application which runs inside of FastCGI process. The problem is that I am getting poor performance... roughly 1000 SELECTs in 20 seconds. It's not an indexing issue (I promise). This

Re: [sqlite] Help with C API - sqlite3

2007-12-02 Thread Jonathan Hendler
Sonntag, 2. Dezember 2007 14:10 >> An: sqlite-users@sqlite.org >> Betreff: [sqlite] Help with C API - sqlite3 >> >> Hi All, >> >> I'm writing a C application which runs inside of FastCGI process. >> >> The problem is that I am getting poor perfo

Re: [sqlite] Help with C API - sqlite3

2007-12-02 Thread Michael Ruck
Don't use sqlite3_get_table. Use sqlite3_prepare_v2, sqlite3_step, sqlite3_finalize and related APIs instead. Mike > -Ursprüngliche Nachricht- > Von: Jonathan Hendler [mailto:[EMAIL PROTECTED] > Gesendet: Sonntag, 2. Dezember 2007 14:10 > An: sqlite-users@sqlite.org &

[sqlite] Help with C API - sqlite3

2007-12-02 Thread Jonathan Hendler
Hi All, I'm writing a C application which runs inside of FastCGI process. The problem is that I am getting poor performance... roughly 1000 SELECTs in 20 seconds. It's not an indexing issue (I promise). This is true even when there are only 2 rows. I'm not getting errors. PHP PDO sqlite runs abo

[sqlite] Help with C API - sqlite3

2007-12-02 Thread Jonathan Hendler
Hi All, I'm writing a C application which runs inside of FastCGI process. The problem is that I am getting poor performance... roughly 1000 SELECTs in 20 seconds. It's not an indexing issue (I promise). This is true even when there are only 2 rows. I'm not getting errors. PHP PDO sqlite runs abo

RE: [sqlite] Help with an unusual query

2007-10-24 Thread Samuel R. Neff
ROTECTED] Sent: Wednesday, October 24, 2007 9:46 AM To: sqlite-users@sqlite.org Subject: [sqlite] Help with an unusual query All: I have the following table key data 1 'Version 1' 1 'Version 2' 1 'Version 3' 2 'Versio

[sqlite] Help with an unusual query

2007-10-24 Thread Rich Rattanni
All: I have the following table key data 1 'Version 1' 1 'Version 2' 1 'Version 3' 2 'Version 4' 2 'Version 5' (obviously key is not primary) I want to write a query that returns key data 1 'Version 1 Version 2 Version 3' 2

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-18 Thread Scott Hess
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > Yes. Makes sense (not to cache query results for embedded apps). > So what is cached. Just dirty pages? or are raw tables cached when > queried? SQLite implements a tables and indices as btrees over a pager layer. The pager layer caches pages.

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread John Stanton
PostgreSQL has the capability of storing pre-compiled SQL so that it can be reused and have data bound to the compiled statement. I have not looked at the mechanics, but it would be of interest and educational for you to see the PostgreSQL approach. Sqlite does cache the results of a query.

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Uma Krishnan
Yes. Makes sense (not to cache query results for embedded apps). So what is cached. Just dirty pages? or are raw tables cached when queried? Thanks Uma Scott Hess <[EMAIL PROTECTED]> wrote: On 10/17/07, Trevor Talbot wrote: > On 10/17/07, Uma Krishnan wrote: > > One other question, when a que

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Scott Hess
On 10/17/07, Trevor Talbot <[EMAIL PROTECTED]> wrote: > On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > > One other question, when a query is issued, does SQLite cache the results, > > so that future queries can be processed off the cache (I think not) > > Like the "query cache" in some oth

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > As far as I know, Postgres does not have a virtual engine. I could be wrong. It's not a virtual machine style, where it has a specific instruction set; instead it's more like a graph of operations. Execution means walking a graph instead of

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > One other question, when a query is issued, does SQLite cache the results, so > that future queries can be processed off the cache (I think not) Like the "query cache" in some other databases? No. SQLite does have a cache of database pages

RE: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Griggs, Donald
Regarding: "... when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) " ... = P.S. And I should certainly have mentioned the sqlite items below: http://sqlite.org/pragma.html PRAGMA cache_size= Number-of-pages;

RE: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Griggs, Donald
Regarding: "... when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) " Hi Uma, In effect, powerful caching effects *do* occur because of the disk cache provided by modern operating systems. Since the hard disk operations are

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Uma Krishnan
Thanks John and Joe for your responses. As far as I know, Postgres does not have a virtual engine. I could be wrong. One other question, when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) Thanks Uma John Stanton <[EMAIL

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread John Stanton
Moreover, is it typical to have an implementation like VDBE in other databases as well? This is a common approach and has been used for a very long time. For example we used it in products produced during the 1980s because producing a virtual machine and a compiler for its application-specif

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread Joe Wilson
--- Uma Krishnan <[EMAIL PROTECTED]> wrote: > I'm a student trying to understand SQLite for my DB project. There are a > couple of aspects that > I don't quite understand: > 1) VDBE. I see how the vdbe stack is created using VDBEAddOp etc. But once > the code is > generated, I don't see when it's

[sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread Uma Krishnan
Hello, I'm a student trying to understand SQLite for my DB project. There are a couple of aspects that I don't quite understand: 1) VDBE. I see how the vdbe stack is created using VDBEAddOp etc. But once the code is generated, I don't see when it's executed. Moreover, is it typical to have an i

Re: [sqlite] HELP!!!! LINKING AND LOADING FTS - on Linux/Ubuntu

2007-09-17 Thread Scott Derrick
is the fts2 a library? if so you probably need to put it in a directory that is in the list of library directory's. You also may need to run ldconfig to update the dynamic linker as the the whereabouts of your new lib. use "man ldconfig" for the how-to Scott Uma Krishnan wrote: Hello, I'

Re: [sqlite] HELP!!!! LINKING AND LOADING FTS - on Linux/Ubuntu

2007-09-17 Thread Scott Hess
To help isolate if it's actually a library path problem, you might try using the full path. So, instead of: select load_extension('fts2'); do: select load_extension('/path/to/libfts2.so'); Modified for Windows as appropriate (sorry, I mostly use Linux and static linking). If that works,

[sqlite] HELP!!!! LINKING AND LOADING FTS - on Linux/Ubuntu

2007-09-17 Thread Uma Krishnan
Hello, I'm having trouble loading fts2. I modified makefile to create fts2 library on Linux/Ubuntu. When I attempt to load fts2 using the command: select load_extension('fts2'), i get the error shared library not found. ( noticed that it had not created the .so file, only .la file.) I do have

Re: [sqlite] HELP - CREATING A SQLITE3 BINARY INSTEAD OF A BASH

2007-09-10 Thread Uma Krishnan
Thanks Joe and Dan Yes, I now have the binary file. Much appreciated - Uma Joe Wilson <[EMAIL PROTECTED]> wrote: autoconf generates the sqlite3 script when libsqlite3.so is used to set up the LD_LIBRARY_PATH. To avoid this, build a static sqlite3. ./configure --disable-shared m

Re: [sqlite] HELP - CREATING A SQLITE3 BINARY INSTEAD OF A BASH

2007-09-10 Thread Joe Wilson
autoconf generates the sqlite3 script when libsqlite3.so is used to set up the LD_LIBRARY_PATH. To avoid this, build a static sqlite3. ./configure --disable-shared make clean make sqlite3 optional: file sqlite3 ldd sqlite3 --- Uma Krishnan <[EMAIL PROTECTED]> wrote: > I'm trying to

Re: [sqlite] HELP - CREATING A SQLITE3 BINARY INSTEAD OF A BASH

2007-09-10 Thread Dan Kennedy
On Mon, 2007-09-10 at 10:01 -0700, Uma Krishnan wrote: > Hello, > > I'm trying to debug sqlite3. But in order for me to do that, I need sqlite3 > binary. The makefile generates a bash file. I'm confused as how that happens. > After all, gcc is used to generate sqlite3 executable > > Any poi

[sqlite] HELP - CREATING A SQLITE3 BINARY INSTEAD OF A BASH

2007-09-10 Thread Uma Krishnan
Hello, I'm trying to debug sqlite3. But in order for me to do that, I need sqlite3 binary. The makefile generates a bash file. I'm confused as how that happens. After all, gcc is used to generate sqlite3 executable Any pointers will be much appreciated. Thanks Uma

Re: [sqlite] HELP! DDD & SQLite

2007-09-08 Thread Uma Krishnan
Hello Ken, I just realized that sqlite3 is a bash program. When I do ddd sqlite3, it gives an error. So when I need to load a program, thru GUI interface I load main.o. But I guess that's not right What should I do? Thanks Uma Ken <[EMAIL PROTECTED]> wrote: you need

Re: [sqlite] HELP! DDD & SQLite

2007-09-08 Thread Ken
you need to set a breakpoint. hit the continue button in DDD. That will allow execution of the code and allow the attached program to continue. It would be better however to run ddd as follows: ddd sqlite3 Then set a breakpoint. Then run the program inside the ddd that way you can first set b

[sqlite] HELP! DDD & SQLite

2007-09-07 Thread Uma Krishnan
Hello I'm trying to debug SQLite (to understand the code). But e when I attach the process sqlite3, the sqlite3 terminal hangs (ie would not accept any user inputs) till I detach. Can someone please tell me what I'm doing wrong Thanks Uma Cory Nelson <[EMAIL PROTECTED]> wrote: On 9/7/07,

Re: [sqlite] Help with performance...

2007-08-15 Thread Ken
Joe, each of the tables involved also had a parent table. that was also being copied. It turned out that the parent table copy (insert .. select) was taking over 50% of the time. So I flattened the tables including the neccessary fields into the children tables. This doubled the throughput

Re: [sqlite] Help with performance...

2007-08-12 Thread Joe Wilson
Forget about the alternate insert statements I suggested. Assuming "id" is declared INTEGER PRIMARY KEY in all tables, you can't get better performance than this in a single insert statement: insert into x select x1.* from a.x x1, y where x1.id = y.id;

Re: [sqlite] Help with performance...

2007-08-12 Thread Ken
Joe, Yes I have temp_store = memory... I think during the compilation of the library. I don't think I need the order by clause but I'll try it just to see if it helps... The original table is created and stored in sorted order so just a plain select returns sorted rows. I'll

Re: [sqlite] Help with performance...

2007-08-12 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote: > This should be faster: > > insert into x > select * from a.x x1 > where exists (select 1 from Y where x1.id = y.id); > > See if adding an order by statement will make it faster by speeding > up the inserts: > > insert into x > select * from a

Re: [sqlite] Help with performance...

2007-08-12 Thread Joe Wilson
This should be faster: insert into x select * from a.x x1 where exists (select 1 from Y where x1.id = y.id); See if adding an order by statement will make it faster by speeding up the inserts: insert into x select * from a.x x1 where exists (select 1 from Y where x1.id = y.id) orde

Re: [sqlite] Help with performance...

2007-08-12 Thread Ken
Joe, Thanks for the reply. The id field is also the Primary Key and no other indices exist. I've run the explan query plan and they seem optimal, reading table X, and using an index access into Z. I just had a thought. It seems to me that doing the insert into X select from

Re: [sqlite] Help with performance...

2007-08-11 Thread Joe Wilson
Not much you can do. You could examine the output of EXPLAIN QUERY PLAN for those statements. Hard to know without knowing the schema, but try making the "id" an INTEGER PRIMARY KEY, assuming it's appropriate for your data. Try to have as few indexes as possible on the table being inserted into.

[sqlite] Help with performance...

2007-08-10 Thread Ken
I'm looking for your help solving a performance issue: Master db and an attached db. called A Table x and table Y are identical in both the master and Attached database. table Z is built to determine the set of rows to copy and has an index on the id field. The goal is to move data from many a

Re: [sqlite] Help Creating database????

2007-08-07 Thread Michael Hooker
erious places we only find months after we thought we'd failed to create them! Michael Hooker - Original Message - From: "Griggs, Donald" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 07, 2007 1:51 PM Subject: RE: [sqlite] Help Creating database Hi Kishore,

RE: [sqlite] Help Creating database????

2007-08-07 Thread Griggs, Donald
Hi Kishore, Regarding: " Can you give me the commands to createt 'test.db' database and to create a sample table in this database? " Try Sqlite3 test.db > CREATE TABLE MyTable (a, b, c); > .quit - To unsubscribe, send

[sqlite] Help Creating database????

2007-08-06 Thread kishora . subramanyajois
Hi, I have sqlite3.exe When I execute it, the following prompt will be displayed sqlite> I would like to know how to create a database? I tried, sqlite>sqlite3 test.db ...>^Z It is not creating. I am getting an error like "S

[sqlite] Help with order-by query

2007-07-15 Thread Alberto Simões
Hi I have this simple schema for news: sqlite> .schema CREATE TABLE news (year,month,day,title,text); CREATE INDEX date ON news(year,month,day); And this query results not as expected... sqlite> SELECT * FROM news ORDER BY year DESC,month DESC,day DESC; 2007|7|7|Novo design|... 2007|6|19|10.000

Re: [sqlite] Help with compiling 3.3.17 version for WinCE

2007-06-18 Thread Nuno Lucas
On 6/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I've download the amalgamation (single .c file) version of SQLite 3.3.17 and I'm trying to compile it using Embedded Visual C++ 3.0, but I'm getting some compiling errors such as,fatal error C1083: Cannot open include file: 'assert.h':

[sqlite] Help with compiling 3.3.17 version for WinCE

2007-06-16 Thread [EMAIL PROTECTED]
I've download the amalgamation (single .c file) version of SQLite 3.3.17 and I'm trying to compile it using Embedded Visual C++ 3.0, but I'm getting some compiling errors such as,fatal error C1083: Cannot open include file: 'assert.h': No such file or directoryIs there any special settings I

RE: [sqlite] Help wiith SQL - first row of each group

2007-05-08 Thread Adler, Eliedaat
uot;accepts" the first row per group. Thanks again, Eliedaat -Original Message- From: Ed Pasma [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 10:28 PM To: Adler, Eliedaat Cc: sqlite-users@sqlite.org Subject: RE: [sqlite] Help wiith SQL - first row of each group This solution

Re: [sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Tomash Brechko
On Mon, May 07, 2007 at 19:20:49 +0400, Tomash Brechko wrote: > But with SQLite 3.x there is only one user data pointer per user > defined aggregate function, so no parallel aggregate execution is > possible. Ah, I was too fast again :/. GROUP BY is really two-pass, but my understanding why it is

Re: [sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Tomash Brechko
On Mon, May 07, 2007 at 18:10:29 +0400, Tomash Brechko wrote: > The solution with two table scans might be > > SELECT * FROM RESULT_TABLE a > WHERE P = (SELECT MIN(P) FROM RESULT_TABLE b WHERE b.G = a.G); > > You may also try to play with indexes G, P. > > It seems to be impossible to do onl

RE: [sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Adler, Eliedaat
tions that "scans" TEST only once? -Original Message- From: Maulkye [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 4:35 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Help wiith SQL - first row of each group How about something like this: create table tes

Re: [sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Tomash Brechko
On Mon, May 07, 2007 at 15:38:22 +0300, Adler, Eliedaat wrote: > I need to define a query that returns only the "first' row in each group > - i.e. the row with the lowest display priority: > > - most preferably a query that doesn't require selecting RESULT_TABLE > more than once. The solution wit

Re: [sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Maulkye
'Y', 11) select distinct pri.* from ( select Grp, min(Pri) as 'Pri' from test group by [Grp] ) grp join ( select Grp, Val, Pri from test ) pri on grp.Grp=pri.Grp and grp.Pri=pri.Pri Grp Val Pri --- A X 1 BZ2 CY6 -

[sqlite] Help wiith SQL - first row of each group

2007-05-07 Thread Adler, Eliedaat
Hi guys, I have a complex query result set RESULT_TABLE that returns: GVP ___ AX1 AX2 BY4 BZ2 BX8 CY6 CZ8 CX9 CY11 G -

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-13 Thread Dennis Cote
Samuel R. Neff wrote: Still, I think backwards compatibility and consistency with other databases would be most important in this situation. I just checked MSSQL and it's same as current sqlite which uses the first select statement's column names. Samuel, The following is from Oracle's docu

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
2007 11:09 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Help with SQL syntax. Ticket #2296 On 4/12/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: > > > Wouldn't implementation dependent mean it's not really standardized? The > way I read it the query could still b

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Consider this query: > >SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; > > Is the query above equalent to: > > (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; > > Or is it the same as: > > (2) SELECT a, b FROM t1 UNION S

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Dennis Cote
On 4/12/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: Wouldn't implementation dependent mean it's not really standardized? The way I read it the query could still be considered legal in some dbms and not in others (which stinks). Samuel, That's not what the standard says. It says the name

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
AIL PROTECTED] -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 6:05 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Help with SQL syntax. Ticket #2296 ... Otherwise, the of the i-th column of TR is implementation dependent and not equival

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Darren Duncan
At 7:22 PM + 4/12/07, [EMAIL PROTECTED] wrote: Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
ington D.C. metro area. If interested contact [EMAIL PROTECTED] -Original Message- From: Andrew Finkenstadt [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 3:42 PM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Help with SQL syntax. Ticket #2296 My understanding is: select a, b from

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Andrew Finkenstadt
My understanding is: select a, b from t1 union select b, a from t1 is equivalent to select a as a, b as b from t1 union select b as a, a as b from t1 And therefore, the first sql statement controls the resulting column names, and the order by applies to the column names (transitively) f

[sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread drh
Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 2,1; I need to know th

RE: [sqlite] help with syntax

2007-02-14 Thread Anderson, James H \(IT\)
That did the trick. Thanks very much. jim -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 4:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] help with syntax Anderson, James H (IT) wrote: > I have the following sybase query

RE: [sqlite] help with syntax

2007-02-13 Thread Anderson, James H \(IT\)
Thanks, Dennis, I'll try that. Yes, "*=" means "LEFT JOIN" in sybase syntax. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 4:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] help with syntax Anderson, Jam

Re: [sqlite] help with syntax

2007-02-13 Thread Dennis Cote
Anderson, James H (IT) wrote: I have the following sybase query (a left join) that I'm having trouble translating into the "LEFT JOIN" syntax. Any help appreciated. Thanks, jim. create table tmpRR_ML as select b.ratingCodeas ratingCode, a.CDSpreadCurve as CDSpreadCurve from tmpRR a,

[sqlite] help with syntax

2007-02-13 Thread Anderson, James H \(IT\)
I have the following sybase query (a left join) that I'm having trouble translating into the "LEFT JOIN" syntax. Any help appreciated. Thanks, jim. create table tmpRR_ML as select b.ratingCodeas ratingCode, a.CDSpreadCurve as CDSpreadCurve from tmpRR a, MasterList b, crRefRat

Re: [sqlite] help with understanding the C interface

2007-02-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick X wrote: > the above functions have me a little confused. So sqlite3_open, does > it returns a pointer to the open database or just the success or error > code or both. The return code is an int which is the error code. The pointer reference

[sqlite] help with understanding the C interface

2007-02-06 Thread Patrick X
int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); I'm trying to write a more porta

RE: [sqlite] Help for a newbie

2007-01-24 Thread Birt, Jeffrey
> -Original Message- > From: Leonardo Mateo [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 24, 2007 4:02 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Help for a newbie > > > > > Thanks! This is indeed a big help. I hope to be able to g

Re: [sqlite] Help for a newbie

2007-01-24 Thread Leonardo Mateo
Thanks! This is indeed a big help. I hope to be able to get back to this project in the next few days. The sources I got have the .def file. Are the 'development headers' a product of the build process? I'm not sure I'm getting your question right. If you have the sources, you already have t

RE: [sqlite] Help for a newbie

2007-01-24 Thread Birt, Jeffrey
>Hi, what you'll need to do is to build sqlite2 from sources with MinGW >(Qt4 default compiler for Windows). Once you have this built, probably >you will get an exe file and hopefully a shared library. (look at the >sqlite install docs for instructions on how to build sqlite library) >I've never

Re: [sqlite] Help for a newbie

2007-01-23 Thread Leonardo Mateo
On 1/23/07, Birt, Jeffrey <[EMAIL PROTECTED]> wrote: Hello all, I have been attempting to figure out how to build the sqlite2 plugin for QT4. I need to use V2 as I am working with files written by another program. Here is a synopsis of where I am at: I am a relitive newbie to QT et al (but

[sqlite] Help for a newbie

2007-01-22 Thread Birt, Jeffrey
Hello all, I have been attempting to figure out how to build the sqlite2 plugin for QT4. I need to use V2 as I am working with files written by another program. Here is a synopsis of where I am at: I am a relitive newbie to QT et al (but not programming in general). I managed to downlaod/ins

[sqlite] Help on triggers

2006-08-05 Thread John Newby
Hi, I am creating a GUI to SQLite for my final year projectat University so that the user need not know SQL in order to create a database. I am having trouble when trying to create triggers. The example shown on th SQLite website only shows one example for "UPDATE OF" which seems to be the easis

Re: Re[2]: [sqlite] Help me in SQL

2006-07-24 Thread Jay Sprenkle
On 7/23/06, blins <[EMAIL PROTECTED]> wrote: Hi Jay, Friday, July 21, 2006, 7:05:59 PM, you wrote: JS> Can you change the alias to a different field name than the source tables? I try: select t1.field1 as otherfield1, t2.field2 as otherfield2 from table1 t1 left join table2 t2 on (t1.id

Re[2]: [sqlite] Help me in SQL

2006-07-23 Thread blins
Hi Jay, Friday, July 21, 2006, 7:05:59 PM, you wrote: JS> Can you change the alias to a different field name than the source tables? I try: select t1.field1 as otherfield1, t2.field2 as otherfield2 from table1 t1 left join table2 t2 on (t1.id=t2.refid) and I receive the message on a mista

Re: [sqlite] help with win32/iis install

2006-07-22 Thread greenshire
re is a race condition that begins with the test for file existence and ends with the creation of the database table based on that condition. Pat -Original Message- From: greenshire [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 7:55 PM To: sqlite-users@sqlite.org Subject: [sqlite

RE: [sqlite] help with win32/iis install

2006-07-22 Thread Pat Wibbeler
users querying it from web browsers). There is a race condition that begins with the test for file existence and ends with the creation of the database table based on that condition. Pat -Original Message- From: greenshire [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 7:55 PM

Re: [sqlite] help with win32/iis install

2006-07-22 Thread Kees Nuyt
Hi, On Fri, 21 Jul 2006 22:54:40 -0400, you wrote: > Greetings. > I recently installed php 5 on Win 2k3 server (iis 6). > I enabled the pdo and sqlite extensions for sqlite, but using > the test script from > http://www.tanguay.at/installPhp5.php5?step=8 , > I get error message: "failed to ope

[sqlite] help with win32/iis install

2006-07-21 Thread greenshire
Greetings. I recently installed php 5 on Win 2k3 server (iis 6). I enabled the pdo and sqlite extensions for sqlite, but using the test script from http://www.tanguay.at/installPhp5.php5?step=8 , I get error message: "failed to open/create the database." Any ideas? Thank you, -- greenshire

Re: [sqlite] Help me in SQL

2006-07-21 Thread Jay Sprenkle
Can you change the alias to a different field name than the source tables? On 7/20/06, blins <[EMAIL PROTECTED]> wrote: Hi sqlite-users@sqlite.org, I use sqliteODBC 0.68 + ADO and SQLite 3.3.6. I try executing sql: select t1.field1 as field1, t2.field2 as field2 from table1 t1 left join tabl

[sqlite] Help me in SQL

2006-07-20 Thread blins
Hi sqlite-users@sqlite.org, I use sqliteODBC 0.68 + ADO and SQLite 3.3.6. I try executing sql: select t1.field1 as field1, t2.field2 as field2 from table1 t1 left join table2 t2 on (t1.id=t2.refid) and I receive the message on a mistake "no such column: t1.field1(1)" -- Компьютеры помогают

Re: [sqlite] Help In SQLIte

2006-07-04 Thread John Stanton
Looks like you haven't include the Sqlite library for the linker. Ashish Singh wrote: Hello SQLite Users I am using SQlite 2.8.17 version I am trying to compile this piece of code on linux system when i type the command "g++ test.cpp" I get the following error which is at the bottom of t

[sqlite] Help In SQLIte

2006-07-03 Thread Ashish Singh
> > > > Hello SQLite Users > > I am using SQlite 2.8.17 version > > I am trying to compile this piece of code on linux system when i type the > > command "g++ > test.cpp" > > > > I get the following error which is at the bottom of this mail. > > If anybody could which is the library file I ne

Re: [sqlite] Help. Database 4096 Mb in Windows XP

2006-06-08 Thread Dennis Cote
Андрей Лапин wrote: Hi. In mine to a database after the size of a file of base has reached 4096 Mb, I am not added any more records. After a command sqlite3_step the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing database". Please help, it is necessary for me to process a lot of

Re: [sqlite] Help. Database 4096 Mb in Windows XP

2006-06-07 Thread Eduardo
At 22:56 07/06/2006, you wrote: Hi. In mine to a database after the size of a file of base has reached 4096 Mb, I am not added any more records. After a command sqlite3_step the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing database". Please help, it is necessary for me to proc

[sqlite] Help. Database 4096 Mb in Windows XP

2006-06-07 Thread Андрей Лапин
Hi. In mine to a database after the size of a file of base has reached 4096 Mb, I am not added any more records. After a command sqlite3_step the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing database". Please help, it is necessary for me to process a lot of records. Operation s

[sqlite] Help. Database 4096mb

2006-06-07 Thread Андрей Лапин
Hi. In mine to a database after the size of a file of base has reached 4096 Mb, I am not added any more records. After a command sqlite3_step the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing database". Please help, it is necessary for me to process a lot of records. Operation s

[sqlite] help - sqlite3_get_table returns SQLITE_ROW?

2006-06-07 Thread Doug Fajardo
I have a sqlite3_get_table query that sometimes returns error code 100 ( SQLITE_ROW). Can someone explain what condition would cause this - I didn't think that this return code would happen for this function, since it should fill up the 'results' table. The query sometimes works, sometimes

[sqlite] Help creatign a database using Finisar SQLite ADO.Net provider and VB.Net

2006-05-22 Thread John Newby
Hi, I am trying to open a database, using the input database name given by the user, if I run the testDB() function where the source of the database is given, it works fine, but if I try to use the createNewdatabase() function, passing back the string with the filename from the input and it doesn'

[sqlite] help with simple query, please

2006-05-18 Thread Brannon King
Suppose I have two tables, A and B. A has two columns: score, location. B has two columns leftLocation, rightLocation. I need the maximum score located outside all entries in table B. B is a small table, say less than 100 entries. I tried this: SELECT max(score),location FROM A, B GROUP BY s

Re: [sqlite] HELP for SQLite MEMORY test.

2006-05-18 Thread Joe Wilson
The latest version of SQLite from CVS should give you comparable :memory: insert timings to that of a file-based database assuming you have enough RAM. Well, no more than 4% slower, anyway. Take a look at this bug ticket http://www.sqlite.org/cvstrac/tktview?tn=1790 for details and how to have :m

Re: [sqlite] HELP for SQLite MEMORY test.

2006-05-18 Thread Jay Sprenkle
On 5/18/06, Manzoor Ilahi Tamimy <[EMAIL PROTECTED]> wrote: DEAR All , I want to use SQLite for our project, the main thing is that the database contains millions of Records. So for the faster operations on the db I want to use the SQLite as in-memory database. I have compared the r

[sqlite] HELP for SQLite MEMORY test.

2006-05-18 Thread Manzoor Ilahi Tamimy
DEAR All , I want to use SQLite for our project, the main thing is that the database contains millions of Records. So for the faster operations on the db I want to use the SQLite as in-memory database. I have compared the results of SQLite as Disk db and as Memory db but I a

Re: [sqlite] help!! insert array into sqlit?

2006-03-28 Thread John Stanton
terryyan wrote: HI,EVERYBODY! I AM WRITING CGI WIHT C ,AND I WANT TO INSER A CHARACTER ARRAY INTO SQLITE IN SENTENCE LIKE: RC=SQLITE_EXEC(DB,"INSERT INTO MYTABLE VALUES('ARRAY_HERE')"); HOW CAN I DO ? THANKS IN ADVANCE! OS: LINUX CGI: C DATABASE: SQLITE THE CHARACTERS IN THE ARRA

[sqlite] help!! insert array into sqlit?

2006-03-28 Thread terryyan
HI,EVERYBODY! I AM WRITING CGI WIHT C ,AND I WANT TO INSER A CHARACTER ARRAY INTO SQLITE IN SENTENCE LIKE: RC=SQLITE_EXEC(DB,"INSERT INTO MYTABLE VALUES('ARRAY_HERE')"); HOW CAN I DO ? THANKS IN ADVANCE! OS: LINUX CGI: C DATABASE: SQLITE THE CHARACTERS IN THE ARRAY RECEIVED FORM U

Re: [sqlite] help with sqlite command

2006-03-28 Thread Walter Meerschaert
Dennis Cote wrote: To get every N'th row after deletions you need some way to assign a series of integers to the result rows. The easiest way I can think of is to create a temporary table from your initial query. Then you can use the modulus operator to select every N'th record from that table

Re: [sqlite] help with sqlite command

2006-03-27 Thread Jay Sprenkle
On 3/27/06, Uma Venkataraman <[EMAIL PROTECTED]> wrote: > I would like to delete n records from a table, based on some condition. Can > some one please let me know how to do this with sqlite? http://sqlite.org/lang_delete.html

Re: [sqlite] help with sqlite command

2006-03-27 Thread Srikanth Mudigonda
The following statement should help: delete from "table_name" where "condition"; Of course, you'd make appropriate substitutions for "table_name" and "condition". HTH On 3/27/06, Uma Venkataraman <[EMAIL PROTECTED]> wrote: > > I would like to delete n records from a table, based on some conditio

<    3   4   5   6   7   8   9   >