Re: [sqlite] prevent sqlite from interpreting string as numbers?

2010-05-14 Thread Igor Tandetnik
peter360 wrote: > I see this in sqlite > > sqlite> create table t1(c1 string); You want t1(c1 text). "string" has no special meaning to SQLite, while "text" does. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] prevent sqlite from interpreting string as numbers?

2010-05-14 Thread peter360
I see this in sqlite sqlite> create table t1(c1 string); sqlite> insert into t1(c1) values('100.200'); sqlite> select * from t1; 100.2 but I don't want sqlite to treat 100.200 as a number. I want to treat it as a string (it is the first two octets of an ip address). How do I achieve that? --

Re: [sqlite] sqlite update with joins

2010-05-14 Thread Simon Hax
Oracle allows to assign an alias to a table in an update-statement like update T x set x.col = . in my eyes thats clear syntax. so there is a better way. I would prefer that syntax. Sqlite should have implemented that. Simon -Ursprüngliche Nachricht- Von: Pavel Ivanov

Re: [sqlite] Composite Foreign Key not enforced

2010-05-14 Thread George Somers
Thanks for your quick answer! I was trying to provide a simple example. Here is another example to demonstrate the problem. I am using a lot "surrogate key with propagation", and this is why I have many composite foreign keys. PRAGMA foreign_keys = ON; CREATE TABLE parent( parentID

Re: [sqlite] Composite Foreign Key not enforced

2010-05-14 Thread Richard Hipp
On Thu, May 13, 2010 at 5:50 PM, George Somers wrote: > Hello, > > It seems that composite FK are not enforced on SQLite 3.6.23.1. > The following script shows that the DELETE FROM table "artist" will work, > even though > there is a composite FK from table "track" toward

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Mikhail Terekhov
On Fri, May 14, 2010 at 12:38 PM, Fabio Spadaro wrote: > > No, i'm sure. Probably typeof in python's sqlite is not supported very mell > or there is other explanation. > It works perfectly in Python: In [2]: import sqlite3 In [3]: conn = sqlite3.connect(':memory:') In

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread P Kishor
On Fri, May 14, 2010 at 11:38 AM, Fabio Spadaro wrote: > Hi, > > 2010/5/14 P Kishor > >> On Fri, May 14, 2010 at 10:11 AM, Fabio Spadaro >> wrote: >> > Hi, >> > >> > 2010/5/14 P Kishor >> > >> >> On

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Simon Slavin
On 14 May 2010, at 5:38pm, Fabio Spadaro wrote: > No, i'm sure. Probably typeof in python's sqlite is not supported very mell > or there is other explanation. It works perfectly inside SQLite: sqlite> CREATE TABLE tabA (a INTEGER, B INTEGER); sqlite> INSERT INTO tabA VALUES (1,10); sqlite>

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Fabio Spadaro
Hi, 2010/5/14 P Kishor > On Fri, May 14, 2010 at 10:11 AM, Fabio Spadaro > wrote: > > Hi, > > > > 2010/5/14 P Kishor > > > >> On Fri, May 14, 2010 at 9:49 AM, Fabio Spadaro > > >> wrote: > >> > hi, >

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread P Kishor
On Fri, May 14, 2010 at 10:11 AM, Fabio Spadaro wrote: > Hi, > > 2010/5/14 P Kishor > >> On Fri, May 14, 2010 at 9:49 AM, Fabio Spadaro >> wrote: >> > hi, >> > >> > 2010/5/14 P Kishor >> > >> >> On Fri,

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Fabio Spadaro
Hi, 2010/5/14 P Kishor > On Fri, May 14, 2010 at 9:49 AM, Fabio Spadaro > wrote: > > hi, > > > > 2010/5/14 P Kishor > > > >> On Fri, May 14, 2010 at 9:01 AM, Fabio Spadaro > > >> wrote: > >> > I need

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread P Kishor
On Fri, May 14, 2010 at 9:49 AM, Fabio Spadaro wrote: > hi, > > 2010/5/14 P Kishor > >> On Fri, May 14, 2010 at 9:01 AM, Fabio Spadaro >> wrote: >> > I need to identify data types extracted from a >> > join between multiple

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Fabio Spadaro
hi, 2010/5/14 P Kishor > On Fri, May 14, 2010 at 9:01 AM, Fabio Spadaro > wrote: > > I need to identify data types extracted from a > > join between multiple tables without using cross-checking table_info more > > pragmatic. > > > > Could you

Re: [sqlite] Incorrect assertion in mutexes plus pcache1Alloc

2010-05-14 Thread Pavel Ivanov
> Not sure if it's still important, but this is how it looks for me: Thank you, Nikolaus. Your disassembly proves that our guess was correct. Pavel On Fri, May 14, 2010 at 9:45 AM, Nikolaus Rath wrote: > Pavel Ivanov writes: Yeah, I'm around. I

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread Israel Lins Albuquerque
Or you can use sqlite3_column_decltype in conjunction with sqlite3_column_table_name, sqlite3_column_database_name, sqlite3_column_origin_name but to use the last three functions you will need compile sqlite with -DSQLITE_ENABLE_COLUMN_METADATA directive on LCFLAGS or something like this!

Re: [sqlite] Incorrect assertion in mutexes plus pcache1Alloc

2010-05-14 Thread Nikolaus Rath
Pavel Ivanov writes: >>> Yeah, I'm around. I don't know what an "exact disassembly" is or how to >>> provide one, but if someone tells me what to do then I'm most likely >>> willing to do it. > > Nikolaus, you can do it like this: >> gdb your_application > (gdb) disassemble

Re: [sqlite] data type from join multiple tables

2010-05-14 Thread P Kishor
On Fri, May 14, 2010 at 9:01 AM, Fabio Spadaro wrote: > I need to identify data types extracted from a > join between multiple tables without using cross-checking table_info more > pragmatic. > Could you clarify what you really want to do? Your question is not clear at

[sqlite] data type from join multiple tables

2010-05-14 Thread Fabio Spadaro
I need to identify data types extracted from a join between multiple tables without using cross-checking table_info more pragmatic. Is there a faster way to do it? -- Fabio Spadaro www.fabiospadaro.com ___ sqlite-users mailing list

Re: [sqlite] multi processes, so many errores of SQLITE_BUSY and SQLITE_MISUSE

2010-05-14 Thread Black, Michael (IS)
Also -- note that Pavel's "general" advice means "would work in every case". My not be necessary for what you're doing if you don't have a deadlock condition that can occur. But you would find that out if you just put a counter in your BUSY loop and bomb out if it gets too large or takes too

Re: [sqlite] multi processes, so many errores of SQLITE_BUSY and SQLITE_MISUSE

2010-05-14 Thread Black, Michael (IS)
BEGIN while stuff to do do insert,etc if error ROLLBACK goto begin end emd COMMIT Michael D. Black Senior Scientist Northrop Grumman Mission Systems From: sqlite-users-boun...@sqlite.org on behalf of liubin liu Sent: Fri 5/14/2010 1:20

Re: [sqlite] multi processes, so many errores of SQLITE_BUSY and SQLITE_MISUSE

2010-05-14 Thread Pavel Ivanov
> How to rollback current transaction? Execute statement "ROLLBACK". Pavel On Fri, May 14, 2010 at 2:20 AM, liubin liu <7101...@sina.com> wrote: > > How to rollback current transaction? > > > > > > Pavel Ivanov-2 wrote: >> >>> I assume you want the sqllite3_stmt to work -- so you need to loop

[sqlite] JDBC for SQLite

2010-05-14 Thread Serdar Genc
I have been using Xerial for a while but I have noticed that some implementations are missing for ResultSet meta . Could anyone advice me another JDBC for SQlite? or should I continue with Xerial.. Thanks in advance, Serdar Genc web: http://www.iptakip.com

Re: [sqlite] multi processes, so many errores of SQLITE_BUSY and SQLITE_MISUSE

2010-05-14 Thread liubin liu
How to rollback current transaction? Pavel Ivanov-2 wrote: > >> I assume you want the sqllite3_stmt to work -- so you need to loop that >> while it's busy. > > Michael, don't give bad advices. > The most general advice when one gets SQLITE_BUSY is to reset/finalize > all statements and