[sqlite] JOIN on between

2012-01-11 Thread Pawl
Hi, I need to join two table according to range of date. Fist table is error log table second is users{operators} login. I need to show complete table with all error with actual user id. CREATE TABLE [login] ( [id] iNTEGER NOT NULL, [start] TIMESTAMP DEFAULT (datetime('now','localtime'))

[sqlite] joint two table

2012-01-30 Thread Pawl
Hi, I need to joint two table This table show change set up limts value. ++---+---+ | edittime | lim_lower | lim_upper | ++---+---+ | 01.01.2011 | 0.8 | 12.1 | ++---+---+ | 05.01.2011 | 0.7

Re: [sqlite] joint two table

2012-01-30 Thread Pawl
I use TIMESTAMP datatype, disply format is according to local cuture setting ex: 27.1.2012 13:50:32. all compare type is same. Pavel Simon Slavin-3 wrote: > > > On 30 Jan 2012, at 11:16am, Pawl wrote: > >> | 05.01.2011 | 7.7 | 01.05.201

Re: [sqlite] joint two table

2012-02-01 Thread Pawl
Thanks it work. I don't know that sqllite save TIMESTEMP as string, problem is with counting i have to use helpful function like as strftime('%s',timestampevar) .. but ... comparative operator <> = BETWEEN is right. Thanks Igor Tandetnik wrote: > > ... > You probably want something

Re: [sqlite] joint two table

2012-02-01 Thread Pawl
Can I eliminate this problem by using function strftime('%s',timestampevar) it try to rewrute: select * from JX, JX_lim lim1 where lim1.rowid = ( select rowid from JX_lim lim2 where strftime('%s',lim2.edittime) <= strftime('%s',JX.starttime) order by lim2.edittime desc limit 1 it

[sqlite] C# SQLiteCommandBuilder how to return AutoIncrement

2012-03-05 Thread Pawl
Hi, I Table def: - CREATE TABLE [vyroba] ( [ID_VYROBA] INTEGER PRIMARY KEY AUTOINCREMENT, [vlozeno] TIMESTAMP DEFAULT (datetime('now','localtime')), [POPIS] TEXT NOT NULL, [prefix_dmc] TEXT NOT NULL, [kistler_prog1] INT NOT NULL, [kislter_prog2] INT, [ID_PLC_PROG]

Re: [sqlite] C# SQLiteCommandBuilder how to return AutoIncrement

2012-03-05 Thread Pawl
Christoph Kukulies wrote: > > Just a guess: I don't see any Commit or surrounding Transaction. > I don't know what do you thing this. Is any problem in definition DDL? Describe problem: After inserting (successful) autoincrement column have still zero value. It is problem for next processing.

[sqlite] C# How to getorun autoincrement value

2012-03-06 Thread Pawl
Hi, I don't know how to make this EASY thing (for me side) I found only this, but they said it is solverd, but it isn;t http://stackoverflow.com/questions/3828098/solved-how-to-return-autoincrement-value-in-insert-query-in-sqlite I don;t know what I get exception Not supported when I tried to

[sqlite] C# delete primary key used in another table

2012-03-14 Thread Pawl
I have this tables: #1: CREATE TABLE [mat] ( [ID_MAT] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [kod] TEXT, [popis] TEXT UNIQUE, [dilu_aktual] INTEGER, [dilu_aktualmax] INTEGER); #2: CREATE TABLE [mat_spoj] ( [ID_VYROBEK] INTEGER NOT NULL REFERENCES [vyroba]([ID_VYROBA]),