RE: [sqlite] a newbie

2008-01-03 Thread Christopher Smith

> From: [EMAIL PROTECTED]
> To: sqlite-users@sqlite.org
> Date: Thu, 3 Jan 2008 15:21:47 -0600
> Subject: [sqlite] a newbie
> 
> Hey guys,
> 
> My name is Scott Berry and I am totally blind and a newbie to Sqlite.  I
> have two questions concerning Sqlite.  The questions I have is I have an
> Excel file which will be going in to the database for an aircraft program
> for the blind I am making.  I want to turn this (Excel spreadsheet) in to a
> .CVS file comma delimited or tab delimited.  I don't care which.  I am using
> Sqlite Admin from Sqlite.org to do my databases since I am not too
> comfortable with the syntax yet.  However, two questions come to mind:
> 
> 1.  Which of the delimited files .cvs with commas or tabbed would be best to
> use.

Depends on if you have either commas or tab characters within your data.
Commas and tabs are both ASCII characters.

> 2.  I need to put my info in by state and airport is it wiser to make a
> table for each state?  I will be using this with in a Basic 4 PPC program.

If this is your first outing, I would go with something simpler.  If the data 
support it, you could simply keep things in the original Excel arrangement.

> Any help would be very much appreciated.

If you have Excel files implies you're running on a Windows machine?
It might be too much to try at once, but you could consider installing 
ActivePython, http://activestate.com/Products/activepython/
which would then let you use ActiveX data objects to pull directly from the 
.xls file, and then populate the sqlite file.
This would be faster than writing everything out to the hard drive.
However, if the data migration is a one-time event, ignore what I have just 
said, as it is not worth the complexity.

> Scott 
> 

Cheers,
Christopher L. Smith
Have you pondered the meaning of life today?



_
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007

RE: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Christopher Smith

The C/C++ documentation can be found here:
http://sqlite.org/capi3ref.html#sqlite3_create_function

For those of us in the mortal category, various wrappers can make life 
better.  For example,

http://initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions

HTH,
Christopher L. Smith
Have you pondered the meaning of life today?




RE: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Christopher Smith

Bud,
I could well be educated on the point, but I think that this is exactly how 
you go about adding functions for use in the SQL.

R,
Christopher L. Smith
Have you pondered the meaning of life today?




From: Bud Beacham <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org, [EMAIL PROTECTED]
Subject: RE: [sqlite] Functions embedded in SQL statements
Date: Sun, 18 Jun 2006 14:50:23 -0700 (PDT)

Thank you, but I am not looking for C/C++ functions.  I am using
Tcl.  I am looking for the functions that appear to extend the
SQL syntax.  I did not see either of the two functions I
mentioned (ifnull, strftime) on those pages.

bb



--- Christopher Smith <[EMAIL PROTECTED]> wrote:

> The C/C++ documentation can be found here:
> http://sqlite.org/capi3ref.html#sqlite3_create_function
>
> For those of us in the mortal category, various wrappers can
> make life
> better.  For example,
>
http://initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions
>
> HTH,
> Christopher L. Smith
> Have you pondered the meaning of life today?
>
>
>






[sqlite] RE: ezmlm response

2003-12-04 Thread Christopher Smith
SQLite illuminati,
Some questions:
1.  If the integer primary key (say, tbl_pers.pers_id) is the b-tree value 
for
the row, is it necessary to compose update triggers to handle a DELETE FROM  
tbl_pers WHERE pers_id=5; for all of the tables holding pers_id as a foreign 
 key?
2.  I want to update the values of a field based on another table.  Can I 
express this in SQL, or do I need to write an explicit code loop?
UPDATE tlkp_a INNER JOIN tbl_b ON tlkp_a.event_type_id = tbl_b.event_type_id
SET tlkp_a.event_type_id = tbl_b.event_type_id;
The gist of this is that I want to write an Access=>ANSI SQL tool that dumps 
the Access database to a text SQL DDL file, but the AutoNumber=>INTEGER 
PRIMARY KEY is a little problematic.  Might have to stoop to two files with 
a script in between to manage the procedural aspects.  :(
Not the worst outcome, overall.
R,
Chris

_
Winterize your home with tips from MSN House & Home. 
http://special.msn.com/home/warmhome.armx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]