Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Eugene Wee
Hi, What is the error? It seems to me that both of these should work: select count(DISTINCT Name) from TableA select count(DISTINCT Name) as nameCount from TableA Regards, Eugene Wee Bharath Booshan L wrote: > Thanks for your quick response, > >> select count(DISTINCT Name) nameCount from

Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
Yeah!! I got it right this time. Select count(*) from ( select DISTINCT Name from TableA); But what's not getting into my mind is the difference b/w the following two queries: Select count( Name) from TableA -- works fine Select count(DISTINCT Name) from TableA -- doesn't work, Any reason?

Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
Thanks for your quick response, > select count(DISTINCT Name) nameCount from TableA This is not working :(. I am getting the same error. -- Bharath On 2/27/08 12:38 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Try > select count(DISTINCT Name) nameCount from TableA > > Shibu

Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Shibu.Narayanan
Try select count(DISTINCT Name) nameCount from TableA Shibu Narayanan Consultant, PrimeSourcing Division, Investment Banking Group Tel.Office: 91-80-2208-6270 or 91-80-6659-6270 e-mail: [EMAIL PROTECTED] The answer is 42. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
Hello All, This might be simple question, but am not getting the SQL query right for my problem. For eg, consider following table NonUniqueNo Name - 23 A 23 B 24 C 25 A 23 E How can I find the number of people for

Re: [sqlite] Encryption?

2008-02-26 Thread Günter Greschenz
hi, yes i know, my changed my webserver to lighttpd but i had no time to finish the complete the installation because i'm on a business trip right now :-( but its still working if you know the right urls :-) please try http://greschenz.dyndns.org/index.php for the

[sqlite] IF...THEN constructs

2008-02-26 Thread Jason Salas
Hi everyone, I'm used to doing lengthy T-SQL programming in SQL Server, so this is kinda new to me. How does one replicate doing IF...THEN conditional blocks in SQLite 3? Is it all nested CASE statements within the SQL statement(s)? Or should I figure out the logic in my client (web,

Re: [sqlite] Concatenating values from multiple varchar fields

2008-02-26 Thread P Kishor
On 2/26/08, Jason Salas <[EMAIL PROTECTED]> wrote: > I'm new to SQLite, coming over from SQL Server. I often do string > concatenation like so: > > lastName + ', ' + firstName as [name] from myTable > pretty standard SQL way is lastName || ', ' || firstName AS name > But it tries to run a

Re: [sqlite] Concatenating values from multiple varchar fields

2008-02-26 Thread Jason Salas
Never mind folks...I got it! Double-pipes does the trick! "||" lastName || ', ' || firstName as [name] from myTable Awesome. Admittedly confusing at first glance, but awesome. :-) Jason Salas wrote: > I'm new to SQLite, coming over from SQL Server. I often do string > concatenation like

Re: [sqlite] Concatenating values from multiple varchar fields

2008-02-26 Thread Trey Mack
Two pipes || Jason Salas wrote: > I'm new to SQLite, coming over from SQL Server. I often do string > concatenation like so: > > lastName + ', ' + firstName as [name] from myTable > > But it tries to run a math computation and returns '0.0' for each > field. I've tried some other concat

[sqlite] Concatenating values from multiple varchar fields

2008-02-26 Thread Jason Salas
I'm new to SQLite, coming over from SQL Server. I often do string concatenation like so: lastName + ', ' + firstName as [name] from myTable But it tries to run a math computation and returns '0.0' for each field. I've tried some other concat operators that I know of, but none work. How is

Re: [sqlite] Problem to compile 3.5.6.

2008-02-26 Thread John Stanton
Looks like you have compiled Sqlite to use readline but don't have the link library. David Michal wrote: > Hello, > > I have problem to compile it on Slackware 11 x86_64 > > > > gcc -g -O2 -I. -I../sqlite-3.5.6/src -DNDEBUG -DSQLITE_THREADSAFE=1 > -DSQLITE_THREAD_OVERRIDE_LOCK=-1

[sqlite] Use of SUM() causes Alignment Traps on ARM arch

2008-02-26 Thread Rich Rattanni
This is not necessarily a bug, but I thought I might point out that use of the SUM() function causes my program to generate alignment traps on an ARM system. They seem to be proportional to the amount of data in the table. While no harm is caused (I have the kernel set to fix these problems and

[sqlite] Problem to compile 3.5.6.

2008-02-26 Thread David Michal
Hello, I have problem to compile it on Slackware 11 x86_64 gcc -g -O2 -I. -I../sqlite-3.5.6/src -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DHAVE_READLINE=1 -I/usr/include/readline -o .libs/sqlite3 ../sqlite-3.5.6/src/shell.c

Re: [sqlite] Problems with Floating Point

2008-02-26 Thread Jeff Hamilton
The problem is that on ARM there are two ways to represent 64bit floating point numbers when using software floating point emulation, FPA and VFE. FPA uses little endian byte order but big endian word order and is the default for most GCC configurations (why, I have no idea...). VFE is fully

Re: [sqlite] Problems with Floating Point

2008-02-26 Thread Dennis Cote
Michael Penkov wrote: > Hello, > > I'm attempting to use sqlite3 (version 3.5.6, cross-compiled using gcc > 2.95.3) on a Sharp Zaurus CL-3200. Kernel is Linux 2.4.20, armv5tel, > using NetWinder Floating Point Emulator V0.95. > > Overall, it works well, but I am encountering strange problems

[sqlite] Good tutorial/book on SQLite in French?

2008-02-26 Thread Gilles Ganault
Hi I'm looking for a tutorial in French for my... 70-year-old father, who's also not quite at ease with relational databases and SQL. SQLite did the trick to get him to stop using flat-files with home made performance improvements, and move on to SQL. The few books on SQLite haven't been

[sqlite] Spell

2008-02-26 Thread Ion Silvestru
http://sqlite.org/34to35.html : 2.1 The Virtual File System Object The new OS interface for SQLite is built around an object named sqlite3_vfs. The "vfs" standard for "Virtual File System". stands ___ sqlite-users mailing

[sqlite] Using SQLite API with Excel VBA

2008-02-26 Thread Michał Bartyzel
Hi, I have a question for you. I need use SQLite in my Excel application. Unfortunately from some reasons I'm forced to use pure SQLite API without any VBA wrappers. So, I've written following declarations in VBA module: Type SQLite3 End Type Declare Function sqlite3_open Lib

Re: [sqlite] insert on windows server 2003 very slow

2008-02-26 Thread Angela Kramer
Hi, ok, my program used to run for hours, but when using begin and commit it takes only a few seconds. :-) Thank you so much for your help! Best regards, Angela Michael Ruck wrote: > Hi Angela, > > for every iteration of your while loop a new transaction is opened and > commited. You need

Re: [sqlite] insert on windows server 2003 very slow

2008-02-26 Thread Michael Ruck
Hi Angela, for every iteration of your while loop a new transaction is opened and commited. You need to wrap the loop in manual transactions using BEGIN and COMMIT statements. Creating transaction logs is an expensive operation, when compared to the insert itself. Regards, Michael

Re: [sqlite] insert on windows server 2003 very slow

2008-02-26 Thread Angela Kramer
Hi Eugene, thank you for your reply. Eugene Wee wrote: > Hi Angela, > > Did you wrap the inserts in a transaction? I do not start a transaction manually. However a transaction is probably started automatically. But: "Automatically started transactions are committed at the conclusion of the

[sqlite] Two processes (First is RW, second RO)

2008-02-26 Thread Karel Ziegler
Hi, I would want to use the sqlite database in my usb-ethernet(TCP/IP) converter. It should be utmost realtime. I would like check the state of converter via www. I write test application, if it is usable. But I encounter a problem. The first process selects configuration from databases,

[sqlite] Problems with Floating Point

2008-02-26 Thread Michael Penkov
Hello, I'm attempting to use sqlite3 (version 3.5.6, cross-compiled using gcc 2.95.3) on a Sharp Zaurus CL-3200. Kernel is Linux 2.4.20, armv5tel, using NetWinder Floating Point Emulator V0.95. Overall, it works well, but I am encountering strange problems with reading and writing floating

Re: [sqlite] insert on windows server 2003 very slow

2008-02-26 Thread Eugene Wee
Hi Angela, Did you wrap the inserts in a transaction? Regards, Eugene Wee Angela Kramer wrote: > Hi, > > I've written a java programm which reads data from a file and inserts > them into a sqlite database. In order to speed up this process I use > PreparedStatement. > > On a computer

[sqlite] insert on windows server 2003 very slow

2008-02-26 Thread Angela Kramer
Hi, I've written a java programm which reads data from a file and inserts them into a sqlite database. In order to speed up this process I use PreparedStatement. On a computer running Windows XP inserting one line into the database takes about 16 milliseconds. On a machine with Windows Server