Re: [sqlite] CASE WHEN sample ?

2008-05-10 Thread Harold Wood & Meyuni Gani
Better would be
Insert into tablea(ida, value1a)
Select idb, value1b
from tableb
where idb not in(select ida from tablea);

Woody
from his pda

-Original Message-
From: Lothar Behrens <[EMAIL PROTECTED]>
Sent: Saturday, May 10, 2008 2:23 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] CASE WHEN sample ?

Hi,

I am searching for a sample that uses the case when expression.
I like to insert values into a table when these values are not in that 
table before.

My tries to read, understand and try the documentation of expressions 
failed.

Executing this statemen twice creates two rows:

replace into anwendungen (name) values ('lbDMF Manager')

This is pseudo code:

if not exsists (select id from mytable where name = 'some name')
insert into mytable (name) values ('some name')

Is this possible ?

Thanks

Lothar

___
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] CASE WHEN sample ?

2008-05-10 Thread Igor Tandetnik
"Lothar Behrens"
<[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Executing this statemen twice creates two rows:
>
> replace into anwendungen (name) values ('lbDMF Manager')

Make "name" column unique, or create a unique index on it.

Igor Tandetnik 



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


[sqlite] CASE WHEN sample ?

2008-05-10 Thread Lothar Behrens
Hi,

I am searching for a sample that uses the case when expression.
I like to insert values into a table when these values are not in that 
table before.

My tries to read, understand and try the documentation of expressions 
failed.

Executing this statemen twice creates two rows:

replace into anwendungen (name) values ('lbDMF Manager')

This is pseudo code:

if not exsists (select id from mytable where name = 'some name')
insert into mytable (name) values ('some name')

Is this possible ?

Thanks

Lothar

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


Re: [sqlite] development vs production

2008-05-10 Thread Eugene Wee
On Sat, 2008-05-10 at 10:11 -0700, Jim Dodgen wrote:
> SQLite is rock solid.
> 
> Also I don't think it wise to develop on a different DBMS that the one 
> you are going to use in production.

Perhaps Sebastian Stephenson was referring to the "stand-in for an
enterprise database during demos or testing" use on the "Appropriate
Uses For SQLite" page:
http://www.sqlite.org/whentouse.html

That said, the other uses listed seem to make it clear that SQLite is
indeed suitable for production use.

Regards,
Eugene Wee


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


[sqlite] Another vfs redesign consideration

2008-05-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Some methods such as xRead return an error that is sometimes considered
a success such as SQLITE_IOERR_SHORT_READ.  This significantly
complicates things in wrappers as sqlite errors map to exceptions, and
so sometimes they need to be cleared and sometimes not.

A better alternative would be for xRead/xWrite etc to take an out
parameter of how much they read/wrote.  That way something other than
SQLITE_OK will only be returned when there is an actual error.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIJfzGmOOfHg372QQRAuPUAJ41AbcXC413+Y4YENcmXL/TtpqQWwCgqs7w
UaozKlcGKaLEy2YRAEiQEj4=
=hUsx
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] development vs production

2008-05-10 Thread Jim Dodgen
SQLite is rock solid.

Also I don't think it wise to develop on a different DBMS that the one 
you are going to use in production.


sebastian stephenson wrote:
> I see that sqlite is great for development but for production would  
> that be a bright idea?
> see ya
>
> sebey
>
>
> ___
> 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] sqlite2 download ?

2008-05-10 Thread [EMAIL PROTECTED]
Thanks Keith,

found them here: http://www.sqlite.org/sqlite-source-2_8_17.zip



On Sat, 10 May 2008 07:08:44 -0700
"Keith Goodman" <[EMAIL PROTECTED]> wrote:

> On Sat, May 10, 2008 at 4:38 AM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > where do I find the latest sqlite2 tarball ?
> 
> If you have a cvs client:
> 
> (from http://www.sqlite.org/download.html)
> 
> All SQLite source code is maintained in a CVS repository that is
> available for read-only access by anyone. You can interactively view
> the repository contents and download individual files by visiting
> 
> http://www.sqlite.org/cvstrac/dir?d=sqlite.
> 
> To access the repository directly, use the following commands:
> 
> cvs -d :pserver:[EMAIL PROTECTED]:/sqlite login
> cvs -d :pserver:[EMAIL PROTECTED]:/sqlite checkout sqlite
> 
> When the first command prompts you for a password, enter "anonymous".
> 
> To access the SQLite version 2.8 sources, begin by getting the 3.0
> tree as described above. Then update to the "version_2" branch as
> follows:
> 
> cvs update -r version_2
> ___
> 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] sqlite2 download ?

2008-05-10 Thread Keith Goodman
On Sat, May 10, 2008 at 4:38 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> where do I find the latest sqlite2 tarball ?

If you have a cvs client:

(from http://www.sqlite.org/download.html)

All SQLite source code is maintained in a CVS repository that is
available for read-only access by anyone. You can interactively view
the repository contents and download individual files by visiting

http://www.sqlite.org/cvstrac/dir?d=sqlite.

To access the repository directly, use the following commands:

cvs -d :pserver:[EMAIL PROTECTED]:/sqlite login
cvs -d :pserver:[EMAIL PROTECTED]:/sqlite checkout sqlite

When the first command prompts you for a password, enter "anonymous".

To access the SQLite version 2.8 sources, begin by getting the 3.0
tree as described above. Then update to the "version_2" branch as
follows:

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


Re: [sqlite] development vs production

2008-05-10 Thread Rich Shepard
On Sat, 10 May 2008, sebastian stephenson wrote:

> I see that sqlite is great for development but for production would that
> be a bright idea?

   In addition to Roger's comment, take a look at the web site. The home page
shows that Adobe, Mozilla, and Symbian are sponsors.

   Why would you wonder if SQLite is suitable for production environments?
I'm really curious. Your question strikes me as equivalent to asking if gcc
is good for compiling production code while accepting that it's OK for
development work.

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


Re: [sqlite] development vs production

2008-05-10 Thread Federico Granata
2008/5/10 sebastian stephenson <[EMAIL PROTECTED]>:

>
> I see that sqlite is great for development but for production would
> that be a bright idea?
> see ya
>
it you develop a single user embedded sw than sqlite is a good solution, if
you develop a db for a really BIG with many concurrent write access then
sqlite is a bad solution

P.S. sorry for my english
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is this Sorting order right?

2008-05-10 Thread Igor Tandetnik
"Mahalakshmi.m"
<[EMAIL PROTECTED]> wrote
in message
news:[EMAIL PROTECTED]
> What about Japanese Kanji?
>
> Will sqlite sort all the Hiragana,Katakana,Kanji.

Not out of the box. You will have to implement a custom collation. Or,
you can build SQLite with ICU support, then it will use ICU collation
functions.

Igor Tandetnik




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


[sqlite] sqlite2 download ?

2008-05-10 Thread [EMAIL PROTECTED]
Hi All,

where do I find the latest sqlite2 tarball ?


Thanks for supporting,
Mike
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] development vs production

2008-05-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

sebastian stephenson wrote:
> I see that sqlite is great for development but for production would  
> that be a bright idea?

http://sqlite.org/famous.html

There are many many other people using it production, such as the
majority of people on this mailing list!

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIJYMHmOOfHg372QQRAkCcAKCxo27h9qrg7POvR4xMtUeGGFVQWwCcDmtl
cyJU6U7OkVEke49DwvHuKsg=
=1gnq
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Is this Sorting order right?

2008-05-10 Thread Mahalakshmi.m
What about Japanese Kanji? 

Will sqlite sort all the Hiragana,Katakana,Kanji.

I am having some records with starting Unicode as follows. 

 

6B4C  Kanji 歌手生活25周却記念 北島三石1 

30A2  Katakana アンテナ  

 

I am storing it using sqlite3_bind_text16().

But if I sort the above two the Unicode with 6B4C comes first but my desired
output is

30A2  Katakanaアンテナ 

6B4C  Kanji   歌手生活25周却記念 北島三石1

 

Where I was wrong.Kindly advice.

 

Thanks & Regards,

Mahalakshmi

 

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


[sqlite] development vs production

2008-05-10 Thread sebastian stephenson

I see that sqlite is great for development but for production would  
that be a bright idea?
see ya

sebey


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