Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Simon Slavin
On 25 Mar 2012, at 8:44pm, Neo Anderson wrote: > It's just that the two resultsets are not related. What I thought was that I > could gain some performance by combining two SELECT into one statement and > execute it via one prepare/step. Ah. Now we understand. No, you can't. Almost all the

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Larry Brasfield
On Mar 25, Neo Anderson wrote: Do not be confused by the sample SQL statement. What I really wanted to do is return two different resultsets in one statement and wanted an API to handle the two resultsets. For example: select * form table1; select * from table2; And I do not want to use big u

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
ers@sqlite.org > Subject: Re: [sqlite] Handle multiple results using sqlite3_step > > > On Mar 25, 2012, at 9:36 PM, Neo Anderson wrote: > > > And I do not want to use big union. > > Out of curiosity, why is that? SQLite goes to great length to support

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Petite Abeille
On Mar 25, 2012, at 9:36 PM, Neo Anderson wrote: > And I do not want to use big union. Out of curiosity, why is that? SQLite goes to great length to support relational operations. Why not use them? ___ sqlite-users mailing list sqlite-users@sqlite.o

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
I think it's actually not practical to do this. > To: sqlite-users@sqlite.org > From: itandet...@mvps.org > Date: Sun, 25 Mar 2012 08:42:11 -0400 > Subject: Re: [sqlite] Handle multiple results using sqlite3_step > > Neo Anderson wrote: > > Is it possible to

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Jay A. Kreibich
On Sun, Mar 25, 2012 at 06:10:14PM +0800, Neo Anderson scratched on the wall: > > Is it possible to handle multiple results using sqlite3_step or any > other API calls? sqlite3_exec() is the only API call that will process multiple SQL statements in a single call. Its use is somewhat discour

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Igor Tandetnik
Neo Anderson wrote: > Is it possible to handle multiple results using sqlite3_step or any other API > calls? > > I want to execute the following SQL in one statement and want to get the two > resultsets. > > select 1 a; select 2 b; No. In SQLite, each sqlite3_stmt* handle represents one resul

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Kees Nuyt
On Sun, 25 Mar 2012 18:10:14 +0800, Neo Anderson wrote: > > Is it possible to handle multiple results using sqlite3_step or any other API > calls? > > I want to execute the following SQL in one statement and want to get the two > resultsets. > > select 1 a; select 2 b; (that doe not look like