Re: [sqlite] Query question

2011-05-07 Thread cmartin
On Fri, 6 May 2011, Matthew Jones wrote:

> sqlite> create table a (a, b);
> sqlite> insert into a values (10, 1);
> sqlite> insert into a values (10, 2);
> sqlite> insert into a values (10, 2);
> sqlite> insert into a values (11, 2);
> sqlite> insert into a values (11, 2);
> sqlite> insert into a values (11, 3);
> How can I do count equivalent of such a query to find out how many
> distinct values of b there are for a given a? (That is get an answer of
> 2 in the above)

  select a, count(distinct b) from a group by a;

or if you are checking a specific value of a:

  select count(distinct b) from a where a=10;

Chris


>
> Thanks
>
> -- 
> Matthew Jones
> Hewlett-Packard Ltd
> Long Down Avenue
> Stoke Gifford
> Bristol.  BS34 8QZ
> Tel:   +44 (0) 117 312 7490
> Email:matthew.jo...@hp.com
>
> Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks,
> RG12 1HN. Registered No: 690597 England
>
> The contents of this message and any attachments to it are confidential
> and may be legally privileged. If you have received this message in
> error, you should delete it from your system immediately and advise the
> sender.
>
> To any recipient of this message within HP, unless otherwise stated you
> should consider this message and attachments as "HP CONFIDENTIAL".
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Noobie question about importing data into table

2010-07-13 Thread cmartin
On Tue, 13 Jul 2010, Calimeron wrote:

>
> Can somebody point me in the right direction?
>
> I have joined the two tables by doing: select * from ChineseTable,
> EnglishTable on IDX_c = IDX_cedict
>
> Now I would like to save this as a new table, so I can manipulate this table
> in sqlite and other programs.

You can create a table from a SELECT statement, i.e., CREATE TABLE mytable 
AS SELECT ...

See http://www.sqlite.org/lang_createtable.html

Chris
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] (no subject)

2010-05-22 Thread cmartin

On Sat, 22 May 2010, Prakash Reddy Bande wrote:
> Me too, all attempts to unsubscribe have failed.

On Sat, 22 May 2010, pcvetsko...@yahoo.com wrote:
> please unuscribed pcvetko...@yahoo.com

Did you try this:

http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Enter the email address you subscribed with, click 'Unsubscribe or edit 
options', follow the directions.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] famous "constraint failed" error

2010-01-22 Thread cmartin
On Fri, 22 Jan 2010, Jan Bilek wrote:

> processing
> of write transaction fails with strange "constraint failed" error (no. 19).
> I've tried to search the web for any solution, but i haven't found
> anything.

While a web search can be useful, it is often more useful to go straight 
to the relevant source first. In this case, go to http://www.sqlite.org 
and enter "constraint failed" in the search box in the upper right corner. 
Read the first entry which discusses this error.

To search the entire world, I Googled 'sqlite constraint failed' and got 
282,000 results:

http://www.google.com/search?client=opera=en=sqlite+constraint+failed=opera=utf-8=utf-8

The third item in the Google results gives a link to the SQLite docs which 
describe this error.

Chris

On Fri, 22 Jan 2010, Jan Bilek wrote:

> Hello,
> I've got a setup, where one process/thread writes data (multiple inserts
> in one transaction ) to db and other which reads data (one select) from
> db. These two threads use their own db connections. When "write" thread
> and "read" thread access the database at the same time, then processing
> of write transaction fails with strange "constraint failed" error (no. 19).
> I've tried to search the web for any solution, but i haven't found
> anything. Does any sqlite MVP know what could be beyond this strange
> error message.
>
> Thanks for any help.
>
> Sincerely,
> Jan
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Tedious CSV import question

2009-09-24 Thread cmartin
On Thu, 24 Sep 2009, Rich Shepard wrote:

> On Thu, 24 Sep 2009, C. Mundi wrote:
>
>> I just bit the bullet and did it.  Python has an excellent csv module,
>> capable of handling just about any dialect you're likely to encounter.  I
>> am so grateful I did not have to write a parser for CSV.  In just a few
>> lines I can read the csv right into sqlite.  If anyone wants the code I
>> will post it here if deemed appropriate.

Please send me a copy.

Chris


Christopher F. Martin
School of Medicine
Center for Digestive Diseases & Nutrition
CB# 7555, 4104 Bioinformatics Bldg.
University of North Carolina at Chapel Hill
Chapel Hill, North Carolina 27599-7555
Phone: 919.966.9340   Fax: 919.966.7592
~~~


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Subtotal SQL

2009-07-29 Thread cmartin


On Wed, 29 Jul 2009, P Kishor wrote:


For my part, I don't know how to do a running total in a result set
unless I have some kind of a counter that keeps track of the "row
before the current row"


This is also the only way I know of.

Chris



On Wed, Jul 29, 2009 at 8:50 AM, Rich Shepard wrote:

On Wed, 29 Jul 2009, Adler, Eliedaat wrote:


SQL/sqlite challenge  for all:


  No challenge for anyone who knows SQL.


I need a running sum of size that works regardless of what order the objects 
are in.
User Function/Aggregates welcome!


  _All_ implementations of SQL include a suite of aggregate functions, and
SUM() is among those. Take a look at the SQLite Web site, Mike Owens's book,
Rick van der Lans's book, or any introduction to SQL.

  You will write, "SELECT filename, date, owner, size, SUM(size) AS total
                       FROM mytable;"




Well, not really. The above totals across the entire result set. The
OP wants a running total, kinda like in a spreadsheet.

Since the question is phrased as a "challenge," I wonder if the OP has
the answer already, and merely wants to test the SQL sages on the
list. Otherwise, a better spirit would be to simply ask the question
as a question, and not as a challenge.

For my part, I don't know how to do a running total in a result set
unless I have some kind of a counter that keeps track of the "row
before the current row"





--
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread cmartin
On Wed, 22 Jul 2009, scabral wrote:

> i am new to SQLite and i currently have an access database that i would like
> to convert over to a SQLite database.
>
> 1.  Need to automatically import text file into SQLite database on local
> machine (machine always on).  I was thinking of using scheduled task to run
> a script to do this, but not sure if that is possible.
> 2.  Neet to somehow create a front-end to query data from SQLite database
> (not sure if SQLite has front end application).
>
> Basically, i want to get rid of the Access database because the user's have
> to manually update the tables everyday from the text files that get ftp'd
> over.  I was trying to figure out a solution that would automatically load
> the text files withouth any human intervention and then give the user's the
> ability to view the data through some sort of front-end (similar to Access
> form).

If your only problem is automating the import of these text files, there 
are simpler solutions than switching the SQLite. You should be able to 
create a scheduled script (VBScript, Python, whatever) that will import 
the text files directly into Access--the work involved will not be 
appreciably different than what will be required to script/program a 
utility to import the data into SQLite. By sticking with Access, once you 
have the script in place everything you currently have should work the 
same as it does now.

Of course, there are possibly many other (good) reasons you want to 
migrate the whole thing to a SQLite backend, if so, proceed, but to 
solve just the problem you describe, you may want to stick to Access and 
just script the import.

Chris
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] New Book Available

2009-07-09 Thread cmartin
On Thu, 9 Jul 2009, Rich Shepard wrote:

>   Rick van der Laans, who wrote the excellent "Introduction to SQL, 4th Ed."
> (and eariler editions, of course) has just had his new book specific to
> SQLite published. It is another resource for those who want a detailed
> explanation of how to get the most from this great tool.

What is the title? I am not finding a new book by van der 
Laans book on Google or Amazon.

Chris

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Order by term not in result set

2009-06-09 Thread cmartin
On Tue, 9 Jun 2009, Simon Slavin wrote:

>> SELECT id,  url,  selected, name FROM db1.test  UNION
>> SELECT id,  url,  selected, name FROM db2.test
>> ORDER BY name ASC, id DESC LIMIT 100"
>
> I would add to Marin's answer that reading the above, I have no idea
> which database the column 'name' is in.  Suppose db1 and db2 both had
> a 'name' column.  Which one would it be.  So it might be better to use
>
> SELECT id,  url,  selected, name FROM db1.test  UNION
> SELECT id,  url,  selected, name FROM db2.test
> ORDER BY db1.name ASC, db2.id DESC LIMIT 100

The answer to the question 'If both had a name column, which one would it 
be?' is both. The UNION operator creates a resultset having a single name 
column which contains values from both tables. ORDER BY operates on this 
combined resultset, it cannot distinguish between the name values 
contributed by db1 and those contributed by db2. The ordering is only 
performed on the combined results, not on the separate SELECT clauses. 
Once the UNION is generated, there is only a single name column to be 
sorted. So the 'ORDER BY db1.name' shown above gives the same results as 
if you entered 'ORDER BY name'. The 'db1' prefix is ignored in this 
context.

The question "suppose both had a name column" may reflect a 
misunderstanding of the UNION. Each SELECT clause of a union must 
contribute the same number of columns, thus, it is not possible to have 
'name' coming only from one SELECT clause and not the other. For instance, 
this will fail:

  SELECT id,  url,  selected, name FROM db1.test  UNION
  SELECT id,  url,  selected   FROM db2.test;

It fails because the first SELECT has 4 cols, the 2nd has 3. If db2.test 
in fact does not have a name column, but you want include name values from 
db1, you need to use a placeholder like this:

  SELECT id,  url,  selected, name FROM db1.test  UNION
  SELECT id,  url,  selected, NULL FROM db2.test;

or this

  SELECT id,  url,  selected, name FROM db1.test  UNION
  SELECT id,  url,  selected, ' '  FROM db2.test;

The result of these queries will have values from db1 for name, but the 
name column for data contributed by db2 will be NULL/empty.

Chris
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] About Time Field

2009-05-15 Thread cmartin
On Fri, 15 May 2009, Hughman wrote:

>> There is no Time type in SQLite.
>
> Oops... I use Sqlite Administrator to create a table , and the datatypes are
> almost as many as MySQL , such as Date, Time, TimeStamp, varchar.
> Since sqlite only has 5 kinds of datatype, why doesn't it throw a error
> message when I create a table with a wrong datatype?

Igor previously indicated (above) that there is no time type in SQLIte. 
However, he also said:

> For more details, see http://sqlite.org/datatype3.html

Based on your question about errors not being thrown, you apparently did 
not read the above link for the details; if you had you would realize no 
error is thrown because no error has occurred. SQLite does not use static 
typing, like mySQL and most others, it uses manifest typing.

Read the link and all will be clear.

Chris
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Slim down join results (all fields returned)

2009-04-17 Thread cmartin
On Fri, 17 Apr 2009, flakpit wrote:

> Currently, I return any needed data like this.
>
>  select * from pubs,notes,publishers where pub_title like '%salem%'
>  and pubs.note_id=notes.note_id
>  and pubs.publisher_id=publishers.publisher_id
>
> And it works except for all fields in the matching tables being returned.

'*' means 'return all fields'. This has nothing to do with the joins, even 
if you are selecting from a single table '*' means return all fields:

select * from tableA

returns all columns from tableA.

If you only want some fields, just name them in the SELECT:

select pubs.note_id, pubs.publisher_id from ...

Chris

> Is there any way using joins (been playing but can't get them working) so
> that a statement like
>
> pubs.note_id=notes.note_id
>
> Would return only the contents of the notes.note_note field and not all the
> fields in the notes table?
> -- 
> View this message in context: 
> http://www.nabble.com/Slim-down-join-results-%28all-fields-returned%29-tp23098746p23098746.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] delete with an "exists" clause

2009-04-09 Thread cmartin
On Thu, 9 Apr 2009, Dave Dyer wrote:

> This little program deletes all rows.  Is this a bug, or
> perhaps I misunderstand how delete with an exists clause
> is supposed to work.
>
> drop table if exists dummy;
> create table dummy ( var int);
> insert into dummy (var) values (1);
> insert into dummy (var) values (2);
> insert into dummy (var) values (3);
> delete from dummy where exists (select * from dummy where var='2');

First, you don't need/want the quotes around the 2 since you defined it 
as an integer. But that is unrelated to your question.

'exists' returns true if the subquery returns any data at all. Since there 
is at least one row where var=2, exists is true, which means it is true 
for every row in your main clause ('delete from dummy'), so all rows get 
deleted. Your delete query is the functional eqivalent of this:

delete from dummy where 1=1;

Since 1=1 is always true, all rows get deleted.

Note that this qry will not delete any rows:

   delete from dummy where exists (select * from dummy where var='999');

because there is no row where var=999. Exists = false for all rows, 
nothing is deleted.

I realize your example may not reflect the specific needs of your 
application, but in the context of your example, this will achieve what 
you want:

   delete from dummy where var=2;

Chris

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Creating a secondary table automatically

2009-03-10 Thread cmartin
On Tue, 10 Mar 2009, Erik Smith wrote:

> I am new to SQLite and am trying to automatically create a secondary table
> which my python app will query against.  The secondary table is a summary of
> the 1st table by specific types.  I have looked at stored procedures (but
> sqlite does not support these) and triggers with no success.  Any
> recommendations?  Here is a sample of what I am trying to do:
> Existing Table:
>
> 234|John|Smith|1.2|catA
> 234|John|Smith|.8|catA
> 234|John|Smith|1|catB
> 234|John|Smith|5|catC
> 234|John|Smith|.2|catD
> 234|John|Smith|.8|catD
> 567|Jim|Jones|1|catA
> 567|Jim|Jones|2|catB
> 567|Jim|Jones|3|catC
> 567|Jim|Jones|4|catD
> 890|Jane|Mickey|1|catA
> 890|Jane|Mickey|4|catA
> 890|Jane|Mickey|1|catB
> 890|Jane|Mickey|4|catC
> 890|Jane|Mickey|6|catC
>
> New table should have:
>
> 234|John|Smith|2|catA
> 234|John|Smith|1|catB
> 234|John|Smith|5|catC
> 234|John|Smith|1|catD
> 567|Jim|Jones|1|catA
> 567|Jim|Jones|2|catB
> 567|Jim|Jones|3|catC
> 567|Jim|Jones|4|catD
> 890|Jane|Mickey|5|catA
> 890|Jane|Mickey|1|catB
> 890|Jane|Mickey|10|catC

Assuming the names of the columns in the 1st table are: id, fn, ln, 
dataval, and categ, then this qry will summarize it as in your example:

select id, fn, ln, sum(dataval) as sum, categ
group by categ;

This query could serve as your 'secondary table', as you can query against 
it, e.g.,

select id, sum from
(select id, fn, ln, sum(dataval) as sum, categ group by categ);

Or, you can create a view from the first query, like a virtual table, and 
then just refer to the view as a secondary table

http://www.sqlite.org/lang_createview.html

Chris


>
> Thanks.
>
> Erik
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] CURRENT_DATE Behavior

2008-10-21 Thread cmartin
On Tue, 21 Oct 2008, jonwood wrote:

> mikewhit wrote:
>>
>> Using UTC in the DB stops you going mad when something happens
>> on the DST changeover (localtime hours vanish, or happen twice),
>> or you have systems running in or across different countries.
>>
>> It also means you can subtract two times and always get the right answer
>> for elapsed time !
>>
>
> Yes, as pointed out in my original post, I've heard the arguments for using
> UTC time. Folks are just going to need to trust me to make the decision as
> to how appropriate this approach is for my particular project.
>
> BTW, MS SQL Server doesn't do anything like this as far as I know. Given
> some of the comments here, one might wonder how those poor MS SQL Server
> folks are able to get anything working at all. ;-)

SQLServer folks use UTC datetimes, if their design requires it, by 
invoking the GetUTCDate() function:

SQLServer:  INSERT INTO foo (somedatetime) VALUES(GetUTCDate());

I suspect it is quite common, e.g., web apps built on SQLServer backends 
are quite likely to use UTC. At any rate, it is definitely a design 
decision, if one expects that local times will always work in all 
scenarios, but all means use local times. If design criteria change 
unexpectedly in the future to the point where local times become 
problematic, for reasons already mentioned, it will need a redesign. By 
using UTC from the outset, it will be robust to all possible 
datetime-related needs in the future.

Chris

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to use PRIMARY KEY AUTOINCREMENT when modellingweakentities?

2008-09-05 Thread cmartin
I suspect somes confusion is at work here because the books you refer to 
which discuss this issue are likely referring to what is sometimes called 
'natural keys' versus a key based on AUTOINCREMENTed numbers which have no 
direct correspondence to the object. Some entities have the property of 
serving as the own key (a 'natural' key), e.g, phone numbers. A table of 
phone numbers does not need a separate key from the phone number itself. 
However, room numbers (actual room numbers as seen and used in the real 
world) are not like this, hence the books describe room numbers as a 
'weak' entity, where knowing the actual room number by itself is 
insufficient to specify the room in a multi-building database.

In the database schema, you can, as discussed in this thread, use an 
AUTOINCREMENT or SERIAL field in the rooms table to provide a unique ID 
number for each room. If your purpose is just to have a primary key in the 
database table, you are done. But if you want to store actual room numbers 
from real buildings, you need to store those numbers in a separate, 
non-unique field. Then you decide whether to use room+building as the 
'natural' primary key, or a separate ('unnatural') AUTOINCREMENT value as 
a key.

Thus, the confusion arises from the lack of distinction between a 
'natural' primary key consisting of real room numbers and real building 
numbers, versus an internal primary key consisting of a serialized (but 
inherently meaningless) number. The database will do whatever you want, 
you need to decide which schema fits your needs.

Chris

On Fri, 5 Sep 2008, Andreas Ntaflos wrote:

> On Friday 05 September 2008 22:41:14 Igor Tandetnik wrote:
>> Andreas Ntaflos
>>
>> <[EMAIL PROTECTED]> wrote:
>>> On Friday 05 September 2008 21:57:30 Igor Tandetnik wrote:
 Andreas Ntaflos

> Naturally a room cannot be identified without a building so it is a
> weak entity (this seems to be the canonical example in all database
> books I've seen).
>
> I'd like to auto-increment the ID numbers in both tables but as far
> as I can see the AUTOINCREMENT keyword only works the way it is used
> in the Building table. That is, only "INTEGER PRIMARY KEY
> AUTOINCREMENT" is syntactically correct.

 Wait: if you want roomID to be autoincrement, then it's going to be
 unique (which, after all, is the point of autoincrement). Run it by
 my again: why can't you identify a room without a building?
>>>
>>> Well a room's existence depends on the building in which it is.
>>> Different buildings can use the same room numbering scheme so in
>>> order to know which room we are looking at we need to know its owning
>>> building. Hence a room is a weak entity.
>>
>> If you expect rooms in different buildings to have the same ID, then you
>> can't use autoincrement for it anyway.
>
> I understand now what you mean. Somehow I failed to realise that
> auto-incrementing (whether using a SERIAL or AUTOINCREMENT) increments an
> attribute in the table regardless of what it is of which the table is a
> representation. There would not be any two rooms with the same room number,
> regardless of the building they are in.
>
>>> But it seems I misunderstood the point of AUTOINCREMENT. I am looking
>>> for something like PostgreSQL's SERIAL data type [1] so when creating
>>> new rooms I don't have to manually specify the roomID. Instead the
>>> next possible roomID should be chosen automatically when INSERTing.
>>
>> But then you won't have two rooms with the same ID, and there won't be
>> any problem making roomID a primary key.
>>
>> I don't see how you plan to have it both ways.
>
> It doesn't make much sense, yes. I am sorry for the confusion.
>
> My problem statement remains partially valid, though. Auto-incrementing the
> roomID in the Room table would make each room have its very own room number
> but the primary key still would need to consist of both buildingID and roomID
> or else the modelling of a room as a weak entity wouldn't work correctly. The
> buildingID is still a foreign key so SELECTing all rooms of one particular
> building is still possible but that's only part of the conceptual model.
>
> I suppose it's not something the authors of books on database systems would
> approve of. A weak entity's primary key has to include the primary key of its
> owner entity or else it isn't weak. Yet in the case of SQLite and
> AUTOINCREMENT this does not seem possible.
>
> Anyway, thanks for opening my eyes to the obvious :)
>
> Andreas
> -- 
> Andreas Ntaflos
> Vienna, Austria
>
> GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] problem using random() in queries

2008-08-29 Thread cmartin

mySQL differs from MS SQL in it random function handling:

SELECT i, RAND() AS R1, RAND() AS R2 FROM z where RAND() < .4;

iR1R2
1  0.531666  0.692986
3  0.743755  0.906643
4  0.789811   0.04321
6  0.977431  0.576784
8  0.284047  0.336876


Different values for R1 and R2 (each call to RAND() produces different 
values), as Noah expects, including the RAND() criterion.

However, the following output differs from the MS SQL results:

SELECT T1.i, T1.RNDValue
FROM  (select i, RAND() AS RNDValue from z) T1
WHERE T1.RNDValue > .7

i  RNDValue
5  0.902673
9  0.799401


This apparently only calls RAND() once. It consistently returns only 
distinct values for RNDValue, all being greater than .7.

Maybe it is a matter of documentation rather than conforming to some 
standard practice.

Chris


On Fri, 29 Aug 2008, Noah Hart wrote:

> Richard, Before you "fix" it, I'm not convinced it is broken.
>
> From MS SQL server
>
> create table _names (N  varchar(5));
> insert into _names values('a');
> insert into _names values('b');
> insert into _names values('c');
> insert into _names values('d');
> insert into _names values('e');
>
> select N, RAND() as RNDValue from _names
> a 0.301745013642105
> b 0.301745013642105
> c 0.301745013642105
> d 0.301745013642105
> e 0.301745013642105
>
>
> select N, RAND() as RNDValue from _names where RAND() >= 0.5;
> a 0.0427909435260437
> b 0.0427909435260437
> c 0.0427909435260437
> d 0.0427909435260437
> e 0.0427909435260437
>
> From the SQL manual:
> " When you use an algorithm based on GETDATE to generate seed values,
> RAND can still generate duplicate values if the calls to RAND are made
> within the interval of the smallest datepart used in the algorithm. This
> is especially likely when the calls to RAND are included in a single
> batch. Multiple calls to RAND in a single batch can be executed within
> the same millisecond. This is the smallest increment of DATEPART. In
> this case, incorporate a value based on something other than time to
> generate the seed values."
>
>
> So, it comes down to definition:
> I would expect that multiple calls to random always return different
> values, even if in the same line.
>
> So the following should give different results for each call to random()
>
> Select random(), random(), random()
>
> And the following as well:
>
> Select random() where random() >0
>
> The fact that we are aliasing random by a column name makes no
> difference to me.
>
> Therefore: If the "random" function in sqlite is defined as having a
> different value every time it is called, and we explain that this is
> true, even if aliased, then the current implementation works correctly
> and no work, other than documentation is needed.
>
>
> Regards,
>
> Noah
>
>
> -Original Message-
>
>
> OK.  Even though this kind of thing is probably an abuse of SQL, I'm
> working on ticket #3343.  Just for the record, I'd like everybody to
> know that the following is really, really hard to do correctly and is
> going to require a lot of extra code in SQLite - code that nobody will
> ever use in practice:
>
>   SELECT random()%5 AS x, count(*) FROM tab GROUP BY x;
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
>
> CONFIDENTIALITY NOTICE:
> This message may contain confidential and/or privileged information. If you 
> are not the addressee or authorized to receive this for the addressee, you 
> must not use, copy, disclose, or take any action based on this message or any 
> information herein. If you have received this message in error, please advise 
> the sender immediately by reply e-mail and delete this message. Thank you for 
> your cooperation.
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] If row exists use UPDATE else INSERT

2008-08-15 Thread cmartin
On Fri, 15 Aug 2008, Javier Julio wrote:

> Is it possible in SQLite to have a single statement that basically
> says if this row exists run an UPDATE statement, if not run an INSERT?

You can INSERT rows that don't already exist. For example, the following 
creates 2 tables, FOO and BAR that share a common field (KEY), which is 
unique in both tables. It then inserts 3 rows into FOO and one row in BAR:

create table foo (key integer unique, foodata );
create table bar (key integer unique, bardata );
insert into foo values(1,"one");
insert into foo values(2,"two");
insert into foo values(3,"three");
insert into bar values(2,"two");

To insert into BAR only those 2 rows from FOO that do not exist in BAR:

insert into bar (key, bardata) select key, foodata from foo where foo.key not 
in(select key from bar);


BAR now has the same rows as FOO.

If you change a data value in row 2 in FOO:

update foo set foodata="changed" where key=2;

and you want to update BAR with this new value, you can run an update 
based on a join of the common field 'key':

update bar set bardata=(select foodata from foo where key=bar.key);

This is a simple example that may not be appropriate for your situation. 
For instance, the update statement updates ALL rows whether they have 
different values or not. This may not be suitable for a very large 
database, but there are other approaches, e.g.:

update bar set bardata=(select foodata from foo where key=bar.key and 
foodata <> bar.bardata);

This only updates rows where foodata <> bardata. Depending on the 
specifics, you may want to index the 'key' fields to optimize the inserts 
and updates. Also, depending on the nature of the data being update, this 
may be inefficient. You are probably better off using your code to 
identify the rows needing updating/inserting then running specific SQL 
statements.

Chris


Christopher F. Martin
School of Medicine
Center for Digestive Diseases & Nutrition
CB# 7555, 4104 Bioinformatics Bldg.
University of North Carolina at Chapel Hill
Chapel Hill, North Carolina 27599-7555
Phone: 919.966.9340   Fax: 919.966.7592
~~~




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Loading a existing database 100% into memory

2008-08-14 Thread cmartin
On Thu, 14 Aug 2008, D. Richard Hipp wrote:

> On Aug 14, 2008, at 4:18 PM, Brown, Daniel wrote:
>
>> Hello Stefan,
>>
>> I'm trying to use the code snippet you suggested but when I try to
>> query
>> the master table of the attached database I get and error with the
>> following message:
>>  "SQL error: no such table: 'test.sqlite_master';
>>
>> I am running the following queries:
>> 1. "ATTACH DATABASE 'data\\test.db' AS test" - this seems to succeed
>> (no
>> error code).
>> 2. "SELECT tbl_name FROM test.sqlite_master' WHERE type = 'table'" -
>> this one is failing.
>>
>
> Works when I try it.
>
> But I'm not running on windows.  Do you really need two backslashes in
> the filename?  Should there be just a single backslash?  You do not
> quote backslashes in SQL strings as you do in C.
>

> But I'm not running on windows.  Do you really need two backslashes in
> the filename?  Should there be just a single backslash?  You do not

Backslashes are illegal in a Windows filenames, except as folder 
delimiters, so "data\\test.db" is not a valid Windows filename. Hence, if 
this is on Windows, the ATTACH must be failing. It must be 'data\test.db'.

Chris


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] multiple inserts

2008-08-11 Thread cmartin


On Mon, 11 Aug 2008, P Kishor wrote:


On 8/11/08, Kodok M�rton <[EMAIL PROTECTED]> wrote:

Hi,

 Does SQLite accepts multiple insert?
 insert into table (col1,col2) values (val1,val2), (val3,val4), (val5,val6)

 If not, how can I speed up large inserts?
 eg: 1000 rows


one word... transactions


Can you give an example of how to use transactions to accomplish this 
specific case?


Chris


Christopher F. Martin
School of Medicine
Center for Digestive Diseases & Nutrition
CB# 7555, 4104 Bioinformatics Bldg.
University of North Carolina at Chapel Hill
Chapel Hill, North Carolina 27599-7555
Phone: 919.966.9340   Fax: 919.966.7592
~~~









 Regards,
 Marton
 ___
 sqlite-users mailing list
 sqlite-users@sqlite.org
 http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users




--
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3 basics

2008-07-22 Thread cmartin

On Tue, 22 Jul 2008, Keith Goodman wrote:

> On Tue, Jul 22, 2008 at 7:27 AM, Milton Centeno <[EMAIL PROTECTED]> wrote:
>> Thank you for your response.
>>
>> at the sqlite> prompt I enter sqlite3 test.db then I get ...>
>> entering .databases gives me another ...>
>> If I hit the Ctrl C it exits and closes the prompt window.
>
> The command 'sqlite3 test.db' launches the sqlite program. So don't
> enter it at the sqlite prompt. Enter it at your shell prompt.

Milton, try this. From the shell prompt, enter:

sqlite3 test.db

This will open or create a database named 'test.db' in the same folder. 
You will see the sqlite prompt 'sqlite>'. Then enter these lines:

CREATE TABLE table1 (field1, field2);
INSERT INTO table1 VALUES (1,"one");
INSERT INTO table1 VALUES (2,"two");
.quit

Be sure to enter the semi-colons, which are required to terminate each SQL 
statement.

After the '.quit', you are back to the shell prompt. If you look in that 
folder (e.g, 'dir *.db'), you will find a file called 'test.db'. This is 
the SQLite database you just created. If you re-start the program and pass 
this same filename, it will re-open that same database, and you can view 
the data you inserted by entering a SELECT statement:

cmdshellprompt>sqlite3 test.db
sqlite>SELECT * FROM table1;

To exit the SQLite command line program and return to your shell prompt, 
either enter '.quit' (with the leading period), or 'Ctrl-C'.

Chris



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread cmartin

This gives the same result set you got and does not need to be edited:

select
   applicantid,
   group_concat(answer, '|')
   from
 (select applicantid, answer from tblanswers order by questionid)
   group by applicantid;

The group_concat() function is part of recent versions of SQLite. It is 
returning a single string rather than columns, but it can be parsed. The 
subquery ordering by questionid is needed to ensure that the columns 
(answers) from all respondents are in the same order.

However, this will only work if tblanswers will always have one record for 
every question. That is, if your applicants skip one or more questions, 
you will still need to insert a record for skipped questionids, perhaps 
with a default answer like 'NOT ANSWERED'. Similarly, if you add new 
questions to tblquestions later, you will need to insert 'NO ANSWER' 
values into tblanswers for existing applicantids, othewise the columns 
(answers) will not align.

Chris

On Tue, 8 Jul 2008, Andrea Connell wrote:

> I'm not sure if what I want is possible to do in SQL, but I -am- sure
> that one of you will know.
> Given two tables - one with questions to ask applicants and one with an
> applicant's answer to a particular question - I want to make a flattened
> view with all of an applicant's answers in one row. This is easy enough
> to do when I know ahead of time which questions are in the first table,
> but I don't like the hard-coded approach.
>
> My schema is as follows:
>
> CREATE TABLE tblquestions (questionid int, question varchar(100));
> INSERT INTO "tblquestions" VALUES(1,'whats up');
> INSERT INTO "tblquestions" VALUES(2,'how are you');
> INSERT INTO "tblquestions" VALUES(3,'whats your name');
> CREATE TABLE tblanswers (questionid int, applicantid int, answer
> varchar(2500));
> INSERT INTO "tblanswers" VALUES(1,100,'stuff for answer one');
> INSERT INTO "tblanswers" VALUES(2,100,'stuff for answer two');
> INSERT INTO "tblanswers" VALUES(3,100,'stuff for answer three');
> INSERT INTO "tblanswers" VALUES(1,200,'random text one');
> INSERT INTO "tblanswers" VALUES(2,200,'random text two');
> INSERT INTO "tblanswers" VALUES(3,200,'random text three');
>
>
> Here is the view I have come up with so far, which would require editing
> whenever an insert or delete is done on tblQuestions.
>
> CREATE VIEW allanswers as
> SELECT applicantid,
>  (select answer from tblanswers Z where questionid = 1 and
> Z.applicantid = A.applicantid) As Answer1,
>  (select answer from tblanswers Z where questionid = 2 and
> Z.applicantid = A.applicantid) As Answer2,
>  (select answer from tblanswers Z where questionid = 3 and
> Z.applicantid = A.applicantid) As Answer3
> FROM tblanswers A
> group by applicantid;
>
> sqlite> select * from allanswers;
> 100|stuff for answer one|stuff for answer two|stuff for answer three
> 200|random text one|random text two|random text three
>
>
> Has anybody come across a problem like this and found a reasonable
> dynamic solution? Even something like a trigger on tblQuestions to
> change the View would be great, I'm just not sure about the SQL
> involved. If it helps, I don't really care what the columns end up being
> named. Also I can't guarantee that the questionids will be consecutive
> or in any order.
>
> Thanks,
> Andrea
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index and ORDER BY

2008-07-01 Thread cmartin

On Tue, 1 Jul 2008, Alexey Pechnikov wrote:

> Is any difference between "CREATE INDEX ev_idx ON events(type,eid)"
> and "CREATE INDEX ev_idx ON events(type,eid desc)"? What is "desc" keyword
> for index?

The DESC keyword creates the index in descending collation order, rather 
than ascending order (default). I believe this sort order may not be 
observed in older versions, but more recent ones do so.

Chris Martin
UNC-CH


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] splitting field data

2008-06-18 Thread cmartin

On Wed, 18 Jun 2008, P Kishor wrote:

>>  CREATE TABLE foo (ID INTEGER PRIMARY KEY, ITEMS);
>>  INSERT INTO foo VALUES(1,item1;item2;item3);
>>  INSERT INTO foo VALUES(2,item1;item4);
>>  INSERT INTO foo VALUES(3,item5;item3;item7);
>
> The above is incorrect SQL. If you run the above INSERT commands, you
> will get an error because the ITEMS values should be quoted with
> single quotes. It really should be
>
> INSERT INTO foo VALUES (1, 'item1;item2;item3');

Sorry, I was just using this for illustration of the data structure, I 
should have shown it with the (implied) quotes.

> Write a custom function. This kind of stuff is trivial to do in a
> programming language, but SQL is not really the best for this. If you
> are getting the SQL statements to construct your db, best is to
> preprocess that with Perl or Python or whatever you desire.

I am not getting the SQL statements, I am getting the sqlite database 
already in the format shown. I can definitely re-shape it via external 
functions/processing, but I wondered if anyone had any SQL-based 
solutions. I am often pleasantly surprised to find that SQL-syntax exists 
for doing something I didn't think SQL was capable of.

Chris

On Wed, 18 Jun 2008, P Kishor wrote:

> On 6/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I have a table that contains 2 fields: ID, ITEMS, as:
>>
>>  CREATE TABLE foo (ID INTEGER PRIMARY KEY, ITEMS);
>>  INSERT INTO foo VALUES(1,item1;item2;item3);
>>  INSERT INTO foo VALUES(2,item1;item4);
>>  INSERT INTO foo VALUES(3,item5;item3;item7);
>>
>
> The above is incorrect SQL. If you run the above INSERT commands, you
> will get an error because the ITEMS values should be quoted with
> single quotes. It really should be
>
> INSERT INTO foo VALUES (1, 'item1;item2;item3');
>
>>  As shown, ITEMS is comprised of individual data items separated by
>>  semicolons. For some purposes, this concatenated form suits the purpose,
>>  but for other purposes I need to split these items into individual data
>>  points. That is, I want to split the ITEMS (at the semicolons) into
>>  separate rows in a new table FOO2, having fields ID and SINGLEITEM that
>>  looks like this:
>>
>>  ID, SINGLEITEM
>>  1,item1
>>  1,item2
>>  1,item3
>>  2,item1
>>  2,item4
>>  3,item5
>>  3,item3
>>  3,item7
>>
>>  Any suggestions of how to do this in SQLite?
>>
>
>
> Write a custom function. This kind of stuff is trivial to do in a
> programming language, but SQL is not really the best for this. If you
> are getting the SQL statements to construct your db, best is to
> preprocess that with Perl or Python or whatever you desire.
>
> -- 
> Puneet Kishor
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] splitting field data

2008-06-18 Thread cmartin

On Tue, 17 Jun 2008, Rich Shepard wrote:

>   You ought to normalize your data. Consider (and this is just off the top
> of my head) two tables: one to hold categories and their descriptions, the
> other to hold categories and items. Then you can select either specific
> items, all items, or groups of items collected as you wish.

Right, I realize the data should be normalized, but the data I have shown 
is how it arrives in the database from an external source. That data is my 
starting point, and I need to re-shape it for a specific need. I am just 
looking for some efficient syntax to do this re-shaping.

Chris


> On Tue, 17 Jun 2008, [EMAIL PROTECTED] wrote:
>
>> As shown, ITEMS is comprised of individual data items separated by
>> semicolons. For some purposes, this concatenated form suits the purpose,
>> but for other purposes I need to split these items into individual data
>> points. That is, I want to split the ITEMS (at the semicolons) into
>> separate rows in a new table FOO2, having fields ID and SINGLEITEM that
>> looks like this:
>>
>> ID, SINGLEITEM
>> 1,item1
>> 1,item2
>> 1,item3
>> 2,item1
>> 2,item4
>> 3,item5
>> 3,item3
>> 3,item7
>>
>> Any suggestions of how to do this in SQLite?
>
> Chris,
>
>   You ought to normalize your data. Consider (and this is just off the top
> of my head) two tables: one to hold categories and their descriptions, the
> other to hold categories and items. Then you can select either specific
> items, all items, or groups of items collected as you wish.
>
> Rich
>
> -- 
> Richard B. Shepard, Ph.D.   |  IntegrityCredibility
> Applied Ecosystem Services, Inc.|Innovation
>  Voice: 503-667-4517  Fax: 503-667-8863
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] splitting field data

2008-06-17 Thread cmartin
I have a table that contains 2 fields: ID, ITEMS, as:

CREATE TABLE foo (ID INTEGER PRIMARY KEY, ITEMS);
INSERT INTO foo VALUES(1,item1;item2;item3);
INSERT INTO foo VALUES(2,item1;item4);
INSERT INTO foo VALUES(3,item5;item3;item7);

As shown, ITEMS is comprised of individual data items separated by 
semicolons. For some purposes, this concatenated form suits the purpose, 
but for other purposes I need to split these items into individual data 
points. That is, I want to split the ITEMS (at the semicolons) into 
separate rows in a new table FOO2, having fields ID and SINGLEITEM that 
looks like this:

ID, SINGLEITEM
1,item1
1,item2
1,item3
2,item1
2,item4
3,item5
3,item3
3,item7

Any suggestions of how to do this in SQLite?

Chris Martin
UNC-CH


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] delimiting text with embedded quotes

2008-05-08 Thread cmartin
I am converting text data from another database into SQLite. Some text 
data has embedded apostrophes like this:

This was George's big day

Other data has embedded double quotes like this:

The box is 3" wide

I am generating INSERT INTO statements for thousands of records to be used 
in a Windows script to move the data into SQLite. I am needing to use 
different statement (with different delmiters) for each of the above 
2 scenarios:

INSERT INTO tbl VALUES("This was George's big day");
INSERT INTO tbl VALUES('The box is 3" wide');

Double-quotes wrap the apostrophe in #1, apostrophes wrap the double-quote 
in #2. But this means I need to parse the data content for every field in 
order to generate the INSERTs. Is there a single set of delimiters that 
would handle both scenarios without having to parse the data first?

Chris


Christopher F. Martin
School of Medicine
Center for Digestive Diseases & Nutrition
CB# 7555, 4104 Bioinformatics Bldg.
University of North Carolina at Chapel Hill
Chapel Hill, North Carolina 27599-7555
Phone: 919.966.9340   Fax: 919.966.7592
~~~


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE3 datatype

2008-05-07 Thread cmartin

On Wed, 7 May 2008, Joanne Pham wrote:


I was wondering what is the different in size between int(8) and INTEGER
datatype.
Thanks,


In the sense you are asking, there is no difference, but more importantly, 
the question reflects a misunderstanding of how SQLite is designed. Most 
database applcations use datatypes as part of the column definitions; 
SQLite does not, it uses 'affinities' instead. In other database apps you 
assign a datatype to a column; the database engine will then reject (or 
convert) data which does not conform to the declared datatype.


In SQLite, any column can store any kind of data. When you create a table, 
you are not creating 'datatypes, you are defining column 'affintities'. 
Affinities govern the algorithms SQLite uses when processing inserts & 
updates. This is clearly discussed in:



  http://sqlite.org/datatype3.html


To illustrate it for yourself, try this:

CREATE TABLE ztemp (col1 INTEGER, col2 TEXT);
INSERT INTO ztemp VALUES(1234, "abcd");
INSERT INTO ztemp VALUES("abcd", 1234);
SELECT * FROM ztemp;

output from above:
-
1234,abcd
abcd,1234

Notice the second insert. I inserted the text value 'abc' into 'col1', 
which I had defined with an integer affinity. You can see from the output 
that the first column contains both data elements, integer and text, 
because SQLite columns do not have datatypes.


Note that in above I could also define the table as:

  CREATE TABLE ztemp (col1, col2);

and the result with be the same. The database creates the same table with 
or without affinities.


The key sentence in the SQLite docs, in section "2. Column Affinity" is:

"In SQLite version 3, the type of a value is associated with the value 
itself, not with the column or variable in which the value is stored. 
(This is sometimes called manifest typing.) All other SQL databases 
engines that we are aware of use the more restrictive system of static 
typing where the type is associated with the container, not the value."


You need to re-read that section closely and you will see that the answer 
to the question you are asking ("What is the differnce between int(8) and 
INTEGER?") is that there is no difference; the question is not applicable 
in the context of SQLite because SQLite does not use datatypes.


Chris


Christopher F. Martin
School of Medicine
Center for Digestive Diseases & Nutrition
CB# 7555, 4104 Bioinformatics Bldg.
University of North Carolina at Chapel Hill
Chapel Hill, North Carolina 27599-7555
Phone: 919.966.9340   Fax: 919.966.7592
~~~

On Wed, 7 May 2008, Joanne Pham wrote:


Hi ,

"Can you direct us where you find out that "SQLITE3 has bigint and int"
as datatypes?"


Not on any website but one of another project in my company using sqlite 

and

they created one of the using bigint, boolean, int(1)
as the datatype and I have tried these datatype to create the table and 

the

table is created sucessfully without any problem. So
I was wondering what is the different in size between int(8) and INTEGER
datatype.
Thanks,
JP


- Original Message 
From: P Kishor <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database 
Sent: Wednesday, May 7, 2008 10:08:54 AM
Subject: Re: [sqlite] SQLITE3 datatype

On 5/7/08, Joanne Pham <[EMAIL PROTECTED]> wrote:

Hi All,
  I have read online document regarding SQLITE3 data type and below is 

list

of these datatypes:

[ Mark Set ]

� � � � * TEXT
� � � � * NUMERIC
� � � � * INTEGER
� � � � * REAL
� � � � * NONE
  But just now I found out SQLITE3 has bigint and int as another 

datatype.

� Can you direct me where I can find out the complete list of SQLITE
datatypes and the size of each datatype.


Can you direct us where you find out that "SQLITE3 has bigint and int"
as datatypes?



� Thanks,
� JP


� ___
� sqlite-users mailing list
� sqlite-users@sqlite.org
� http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users




� � �




� Be a better friend, newshound, and
� know-it-all with Yahoo! Mobile.� Try it now.�
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
� ___
� sqlite-users mailing list
� sqlite-users@sqlite.org
� http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users




--
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users