[sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread George Ionescu
Hello Dr. Hipp, Hello SQLite users, CREATE TABLE test1(a VARCHAR(100)); INSERT INTO test1 VALUES('501'); INSERT INTO test1 VALUES(' 502 '); SELECT * FROM test1 WHERE a=501; SELECT * FROM test1 WHERE a=502; SELECT * FROM test1 WHERE a<'502'; in MS SQL Server yelds the fol

Re: [sqlite] Question about expected query result??

2004-05-13 Thread Darren Duncan
At 11:05 PM -0400 5/13/04, Shawn Anderson wrote: When I run the following query, I get back 0 results -- anyone have any thoughts? I am expecting to get back 3 records. SELECT DISTINCT ClientIP, ClientDomain, COUNT(ClientDomain) AS ClientDomainCount FROM SMTPLog WHERE Client

[sqlite] Question about expected query result??

2004-05-13 Thread Shawn Anderson
I have the following table/data ClientIPClientDomain 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 211.141.67.7xmailserver.org 211.141.67.7xmailserver.org 211.1

RE: [sqlite] sqlite with Visual Basic

2004-05-13 Thread Greg Obleshchuk
Hi Carlos, Sorry mate I didn't point out the wrappers on Sqlite.Org http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers Greg > -Original Message- > From: Jalil Vaidya [mailto:[EMAIL PROTECTED] > Sent: Friday, 14 May 2004 11:13 AM > To: Carlos Garces; [EMAIL PROTECTED] > Subject: Re: [

[sqlite] overwrite contents of a column with a column from another table

2004-05-13 Thread Al Danial
How does one copy the contents of a column from one table into another table (not altering the table, just overwriting an existing column in the second table)? For example say I have two tables A and B and I want to overwrite the contents of B.y with A.x: create table A(i, x); create table B

Re: [sqlite] sqlite with Visual Basic

2004-05-13 Thread Jalil Vaidya
There is a VBWrapper.zip in the old SQLite yahoo group's file section. The archive contains wrapper over the SQLite API so that it can be used from VB. The API declarations for VB are also in the archieve. Get it from here: http://f4.grp.yahoofs.com/v1/EBqkQKgMWwt8clzVakFnZ6GAGVancQ9q-4gKNXEFX9QQm

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Jeremy Hinegardner
DB2 Version 8.1.5 => CREATE TABLE test1(a VARCHAR(100)); DB2I The SQL command completed successfully. => INSERT INTO test1 VALUES('501'); DB2I The SQL command completed successfully. => INSERT INTO test1 VALUES(' 502 '); DB2I The SQL command completed successfully

RE: [sqlite] sqlite with Visual Basic

2004-05-13 Thread Greg Obleshchuk
Carlos, No you can't the call-back API and the API that’s returns a C style array aren't supported in VB Regards Greg > -Original Message- > From: Carlos Garces [mailto:[EMAIL PROTECTED] > Sent: Friday, 14 May 2004 6:00 AM > To: [EMAIL PROTECTED] > Subject: [sqlite] sqlite with Visual

[sqlite] sqlite with Visual Basic

2004-05-13 Thread Carlos Garces
Hi! I can use SQLLite with Visual Basic without using other external DLL Any sample of using sqlite.dll API? Thanks Carlos Garcés . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Shawn Anderson
Question about support for new intrinsic types, any chance you can add support for DATETIME as well? I mean I really like the date time options available at the moment, but it would be nice if we could do SQL standard queries on datetime columns. Shawn --

Re: [sqlite] Safety of VACUUM?

2004-05-13 Thread Christian Smith
On Thu, 13 May 2004, David Given wrote: > >I'm running sqlite 0.8.6 on a Debian stable build. I have no idea whether it's >been compiled with the thread-safety flag or not, there are no release notes. Not sure whether that's a typo or not, but testing has 2.8.13 available, so you may want to upg

[sqlite] Safety of VACUUM?

2004-05-13 Thread David Given
I have a program (spey, http://spey.sf.net, an email spam filter) that maintains a database of recently seen email addresses using Sqlite. Everyone works very nicely. Periodically a process runs that purges the database of stale addresses. This is just a little script that runs the sqlite shell

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread basil . thomas
Yep. basically our "type less" string fields should have user definable operator overload functions. Sounds like a big change that I doubt DRH would implement anytime soon but it would definitely solve some of these integer/numeric/string/datetime/etc.. conversion/comparisons. We would also have to

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread VTenneti
Not only comparison, but all expressions - arithmetic etc. [EMAIL PROTECTED] com

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread VTenneti
Ditto that. [EMAIL PROTECTED] com

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread basil . thomas
I think the point the SQL assumes is that everything is a string unless you tell it otherwise. How you tell it otherwise can be explicitly done or implicitly done. SQLite seems to be making implicit data conversions when in fact the user may mean something else. Therefore each implicit data convers

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Doug Currie
Firebird 1.5 SQL> CREATE TABLE test1(a VARCHAR(100)); SQL> INSERT INTO test1 VALUES('501'); SQL> INSERT INTO test1 VALUES(' 502 '); SQL> SELECT * FROM test1 WHERE a=501; A === 501 SQL> SELECT * FROM test1 WHERE a=502;

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread VTenneti
Not terribly interested in pursuing this, but that is precisely the point - letting the engine handle the 'technical' things means it needs to know the types of data in it. If the engine doesn't do it, the user has to do it, adding complexity and producing less reliable systems.

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Peter Boehm
> Who can tell me what other SQL database engines do with > the following? > >CREATE TABLE test1(a VARCHAR(100)); >INSERT INTO test1 VALUES('501'); >INSERT INTO test1 VALUES(' 502 '); >SELECT * FROM test1 WHERE a=501; >SELECT * FROM test1 WHERE a=502; >SELECT * FROM test1

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Fred Williams
I guess you read different books than I. The intent was to have the language engine do the required type conversions freeing the user from knowledge of such "technical" things. Like all languages it evolved, and has not remained "simple." Fred > -Original Message- > From: [EMAIL PROTECT

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread VTenneti
Funny, I thought SQL was a more down to earth version of E. F. Codd's mathematical model 'Relational Algebra', with some concepts taken from Relational Calculus. To say types and strong typing weren't part of the original SQL concept isn't right. Typing gives data semantics. Vijay

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Fred Williams
I seem to remember many, many moons ago when studying SQL for the first time, learning that SQL syntax treats everything as character data no matter what the DB column data type is. Also, I think this was to make the SQL syntax more "natural English language" like. I believe the original intent o

Re: RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Felipe Lopes
I agree that compatibility is what counts... Felipe Lopes Em 12 May 2004, Shawn Anderson escreveu: >I agree, I would like to see compatibility with results from other SQL >engines... > >Shawn > >-Original Message- >From: Keith Herold [mailto:[EMAIL PROTECTED] >Sent: Wednesday,

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Brass Tilde
On SQL Server 2000, the following queries: select case when '500' = 500 then 'Equal' else 'Not equal' end select case when 500 = '500' then 'Equal' else 'Not equal' end select case when 500 <> '500' then 'Not Equal' else 'Equal' end select case when '500' <> 500 then 'Not Equal' else

RE: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Jarosław Nozderko
Sybase ASE 12.5.1: CREATE TABLE test1(a VARCHAR(100)) INSERT INTO test1 VALUES('501') INSERT INTO test1 VALUES(' 502 ') SELECT * FROM test1 WHERE a=501 SELECT * FROM test1 WHERE a=502 SELECT * FROM test1 WHERE a<'502' Result: "Implicit conversion from datatype 'VARCHAR'

Fw: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Roy Black
Hello, In mysql: mysql> SELECT * FROM test1 WHERE a=501; +--+ | a| +--+ | 501 | +--+ 1 row in set (0.02 sec) mysql> SELECT * FROM test1 WHERE a=502; +---+ | a | +---+ | 502 | +---+ 1 row in set (0.00 sec) mysql> SELECT * FROM test1 WHERE a<'502'; +---+ | a

Re: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Darren Duncan
I have another suggestion which may help with the comparison for sorting issue, but you may find it a bit outrageous. Essentially, I suggest making SQLite a little bit less typeless. You already have multiple underlying data type representations as I recall, such as numbers, character strings,

RE: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Peter Pistorius
I think it should return 0. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread D. Richard Hipp
George Ionescu wrote: However, wanting to test how the engine compares strings and numbers: SELECT 'match' WHERE '500' = 500; returns 'match'; also, the following statements return the same result: SELECT 'match' WHERE '500' = 500; SELECT 'match' WHERE '500' = 499 + 1; Who can tell me wh

Re: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Darren Duncan
At 8:19 PM -0400 5/12/04, D. Richard Hipp wrote: The development team is making progress on SQLite version 3.0. But we've run across an interesting puzzle. What should be returned by this: SELECT '500'=500; Is the result "0" or "1"? In other words, what happens when you compare a number to a

[sqlite] Attach database

2004-05-13 Thread Jérôme VERITE
While trying to attach a readonly database to another one, I get the message « root page number less than 2 “, It reproduces itself almost each time. I precise the database which has to be attached is a readonly one. Do you have some idea ? Thanks a lot, and excuse me for my english.

[sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread George Ionescu
Hello Dr. Hipp, Hello SQLite users, in MS SQL Server, the following line SELECT '500' = 500; returns a column having the alias '500' and the value 500 :-o However, wanting to test how the engine compares strings and numbers: SELECT 'match' WHERE '500' = 500; returns 'match'; also, the followi

RE: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-13 Thread Jarosław Nozderko
Similar for Sybase ASE 12.5 (wasn't it MSSQL ancestor ?): SELECT '500' = 500 500 === 500 SELECT 500 = '500' Incorrect syntax near '=' I think "SELECT '500' = 500" is not a comparison here, just selection of constant 500 with '500' as column name, just like "select 500 as '500'". Regards, J