Re: [sqlite] joint two table

2012-02-01 Thread Igor Tandetnik
On 2/1/2012 4:13 PM, Pawl wrote: Can I eliminate this problem by using function strftime('%s',timestampevar) Your strings are not in any format that strftime accepts. strftime('%s', '15.01.2011') returns NULL. You really, really should change the format of your timestamps. You could do it

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

Re: [sqlite] joint two table

2012-02-01 Thread Igor Tandetnik
Pawl wrote: > 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. It only seems this way, because all dates in your

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-01-30 Thread Igor Tandetnik
Pawl wrote: > I use TIMESTAMP datatype, disply format is according to local cuture setting > ex: 27.1.2012 13:50:32. > all compare type is same. There is no TIMESTAMP datatype in SQLite. Your dates are stored as strings, and are being compared using regular alphabetical

Re: [sqlite] joint two table

2012-01-30 Thread Igor Tandetnik
Pawl wrote: > > 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 | >

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.2011| 0.7 | 12.1 | >>

Re: [sqlite] joint two table

2012-01-30 Thread Simon Slavin
On 30 Jan 2012, at 11:16am, Pawl wrote: > | 05.01.2011 | 7.7 | 01.05.2011| 0.7 | 12.1 | > ++---+---+--+---+ > ... > > I tried to use cmd JOIN in this content, but didn't work it. > > SELECT JX.*,JX_lim.* FROM JX JOIN JX_lim ON

[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