Re: [sqlite] Having issues Loading an external

2007-09-25 Thread eric higashino
I cant find the type decleration for sqlite3_api_routines type. I greped the sqlite source directory and couldnt find a definition of it. Do you think this is the reason why I am getting a syntax error? On 9/25/07, eric higashino <[EMAIL PROTECTED]> wrote: > > I have tried this and I get a

Re: [sqlite] Having issues Loading an external

2007-09-25 Thread eric higashino
I have tried this and I get a compilation error "extension-functions.c:1849: error: syntax error before '*' token" That line is where i marked with the arrows. I can't see why there would be a syntatic error with that? I have only added this function at the very bottom of the script. I have

Re: [sqlite] Openinig 1 or more connections to db

2007-09-25 Thread Rich Shepard
On Tue, 25 Sep 2007, Runnerpizza Net wrote: do you also think it will be a safe practice for the db or keeping it open all the time could also easily damage the db? You're working with a copy of the database in memory until you explicitly issue a write or flush command ('commit'). The

Re: [sqlite] Openinig 1 or more connections to db

2007-09-25 Thread Runnerpizza Net
Thank you, do you also think it will be a safe practice for the db or keeping it open all the time could also easily damage the db? Thks - Original Message - From: "Trey Mack" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 25, 2007 2:03 PM Subject: Re:

Re: [sqlite] 3.5.0 compatibility x 3.4.x maintenance

2007-09-25 Thread Dan Kennedy
On Tue, 2007-09-25 at 10:06 -0300, Luís Santos wrote: > Hi, folks > > I have read about the changes on 3.5.0. > > That might very well demand changes on several programs that use SQLite > in a more deep way. Can you be more specific? What kind of programs are you thinking of? Dan.

Re: [sqlite] Openinig 1 or more connections to db

2007-09-25 Thread Trey Mack
At the moment I open 1 connection to the SQL Serv.. at the moment of login and I keep it open until the user exit the program. Can I do the same with SQLite, or do you suggest to open and close the connection every time I need it? Will I lose Performance? As I understand it, that's the way

RE: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread B V, Phanisekhar
Thanks Dennis, Your query seems really good. Why SQL doesn't allow "select COUNT (DISTINCT column1, column2) from table"? When it allows: "select DISTINCT column1, column2 from table" and "select COUNT (DISTINCT column1) from table". Regards, Phani -Original Message- From: Dennis

FW: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Sreedhar.a
Seems useful Best Regards, A.Sreedhar. -Original Message- From: Dennis Povshedny [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 25, 2007 4:40 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] select COUNT (DISTINCT column1, column2) from table? Hi Phani! For your sample the

RE: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Dennis Povshedny
Hi Phani! For your sample the following query will fit: select COUNT (DISTINCT year*12+month) FROM m If you take a look at EXPLAIN select COUNT (DISTINCT year*12+month) FROM m you will see that effectiveness is almost the same than in case of EXPLAIN select COUNT (DISTINCT year) FROM m and

RE: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread B V, Phanisekhar
Hi Simon, Yeah, I thought of the query which u mentioned. But the problem is overhead is too much. I was wondering why SQL doesn't support something like: Select COUNT (DISTINCT year, month) FROM table when it supports: select COUNT (DISTINCT year) FROM table Regards, Phani

Re: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Bharath Booshan L
Hi Phani, Hope this answers your Query. SQLite version 3.1.3 Enter ".help" for instructions sqlite> create table m( mNo integer, year integer, month integer ); sqlite> insert into m values (1, 2007, 9); sqlite> insert into m values (2, 2006, 5); sqlite> insert into m values (3, 2006, 5); sqlite>

RE: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread B V, Phanisekhar
Hi Simon, Assume you have a following data: matchNo, year, month 34 2007 9 27 2006 5 26 2006 5 24 2005 4 For the above data my answer should be 3, since there are three unique combination of year, month {(2007, 9), (2006, 5), (2005, 4)}. Here

Re: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Simon Davies
On 25/09/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: . . > Assume you have a following data: > > matchNo, year, month > > 34 2007 9 > > 27 2006 5 > > 26 2006 5 > > Now distinct year, month will return > > 2007, 9 > > 2006, 5 > > Is there a way by which I

[sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread B V, Phanisekhar
Assume I have a database. Maintable (matchNo integer, year INTEGER, month INTEGER) I have to find the count of distinct year, month combinations in which matches were played. I tried the query select COUNT (DISTINCT column1, column2) from table but this gives an error. I would like to know

[sqlite] Openinig 1 or more connections to db

2007-09-25 Thread Runnerpizza Net
Hello, I am pretty new to SQLite and I have to clear these question before I begin to move and port a big program from using a "bigger" database to my favourite SQLite: When the program run, there are continuesly queries, inserts and updates At the moment I open 1 connection to the SQL Serv..