Re: [sqlite] Value between changes

2008-03-15 Thread Igor Tandetnik
"Jay A. Kreibich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, Mar 14, 2008 at 10:47:35AM -0400, Igor Tandetnik scratched on > the wall: >> P Kishor <[EMAIL PROTECTED]> wrote: >>> On 3/14/08, BandIT >>> <[EMAIL PROTECTED]> wrote: I have a table:

Re: [sqlite] Value between changes

2008-03-14 Thread Jay A. Kreibich
On Fri, Mar 14, 2008 at 10:47:35AM -0400, Igor Tandetnik scratched on the wall: > P Kishor <[EMAIL PROTECTED]> wrote: > > On 3/14/08, BandIT > > <[EMAIL PROTECTED]> wrote: > >> > >> I have a table: > >> > >> CREATE TABLE Log > >> ( > >> TimeStamp char(14), -> Format MMDDHHNNSS > >>

Re: [sqlite] Value between changes

2008-03-14 Thread John Stanton
Store your timestamp in the Sqlite format as a floating point number and use the built-in date functions. Bjørn T. Nøstdahl wrote: >>Can you give an example of the output? For example, do you want to >>know the difference between A0001 and A0002 or between to records with >>the same code? > >

Re: [sqlite] Value between changes

2008-03-14 Thread Dennis Cote
Igor Tandetnik wrote: > BandIT <[EMAIL PROTECTED]> wrote: >> I have a table: >> >> CREATE TABLE Log >> ( >> TimeStamp char(14), -> Format MMDDHHNNSS >> Code char(5),-> 5 digit status code >> ) >> >> example: >> >> 20080314100030 A0001 >> 20080314101000 A0002 >> 20080314101700 A >>

Re: [sqlite] Value between changes

2008-03-14 Thread Igor Tandetnik
BandIT <[EMAIL PROTECTED]> wrote: > I have a table: > > CREATE TABLE Log > ( > TimeStamp char(14), -> Format MMDDHHNNSS > Code char(5),-> 5 digit status code > ) > > example: > > 20080314100030 A0001 > 20080314101000 A0002 > 20080314101700 A > 20080314102000 A0002 > 20080314102100

Re: [sqlite] Value between changes

2008-03-14 Thread Igor Tandetnik
P Kishor <[EMAIL PROTECTED]> wrote: > On 3/14/08, BandIT > <[EMAIL PROTECTED]> wrote: >> >> I have a table: >> >> CREATE TABLE Log >> ( >> TimeStamp char(14), -> Format MMDDHHNNSS >> Code char(5),-> 5 digit status code >> ) >> >> example: >> >> 20080314100030 A0001 >>

Re: [sqlite] Value between changes

2008-03-14 Thread P Kishor
On 3/14/08, Bjørn T. Nøstdahl <[EMAIL PROTECTED]> wrote: > > Can you give an example of the output? For example, do you want to > > know the difference between A0001 and A0002 or between to records with > > the same code? > > > 20080314100030 A0001 (9min 30sec to next status change) >

Re: [sqlite] Value between changes

2008-03-14 Thread Bjørn T . Nøstdahl
> Can you give an example of the output? For example, do you want to > know the difference between A0001 and A0002 or between to records with > the same code? 20080314100030 A0001 (9min 30sec to next status change) 20080314101000 A0002 (7min to next status change) 20080314101700 A (3min to

Re: [sqlite] Value between changes

2008-03-14 Thread P Kishor
On 3/14/08, BandIT <[EMAIL PROTECTED]> wrote: > > I have a table: > > CREATE TABLE Log > ( > TimeStamp char(14), -> Format MMDDHHNNSS > Code char(5),-> 5 digit status code > ) > > example: > > 20080314100030 A0001 > 20080314101000 A0002 > 20080314101700 A > 20080314102000

Re: [sqlite] Value between changes

2008-03-14 Thread Robert Citek
On Fri, Mar 14, 2008 at 8:07 AM, BandIT <[EMAIL PROTECTED]> wrote: > I would like a query to output the the time between the status codes (sum) > to know how long each status has been active. I am not so very familiar with > SQL and SQLite, and I hope I am posting to the correct forum. Can you

[sqlite] Value between changes

2008-03-14 Thread BandIT
I have a table: CREATE TABLE Log ( TimeStamp char(14), -> Format MMDDHHNNSS Code char(5),-> 5 digit status code ) example: 20080314100030 A0001 20080314101000 A0002 20080314101700 A 20080314102000 A0002 20080314102100 A I would like a query to output the the time between