Re: Re: [sqlite] Sample dll using

2006-12-22 Thread Artem Yankovskiy
Thanks! Can at whom is small sample on C/ะก ++? --- jose isaias cabrera <[EMAIL PROTECTED]> wrote: > > http://www.dprogramming.com/enticeaddrbook.html > > > > > - Original Message - > From: "Artem Yankovskiy" <[EMAIL PROTECTED]> > To: > Sent: Thursday,

[sqlite] sqlite web site performance

2006-12-22 Thread w wg
Hi , The documents on sqlite official site says that sqlite can works fine if a site's traciffic is under 10 click per day. But I found a lot of sites ( including IBM developer network) say the number is only 1 per day. Which one is correct ? 1 or 10 ? Thank you. -- WWG

[sqlite] calculate age

2006-12-22 Thread RB Smissaert
Is there a way to calculate the age given the 2 dates in the standard format -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide by 365, but that won't be accurate enough. It would be easy to calculate the age in the application and update the database, but I prefer to do

Re: [sqlite] calculate age

2006-12-22 Thread Dennis Cote
RB Smissaert wrote: Is there a way to calculate the age given the 2 dates in the standard format -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide by 365, but that won't be accurate enough. It would be easy to calculate the age in the application and update the

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
This 'hard-coded' SQL does the job: select (date('now') - '2002-12-23') - ((julianday('now', '-4year') < julianday('2002-12-23'))) But the trouble is to get the value 4 here. This value should be date('now') - '2002-12-23' But I can't get the right syntax to achieve that. RBS -Original

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Thanks, it is getting close, but it doesn't quite work. For example this: select case when date('2002-12-22', '+' || strftime('%Y', 'now') - strftime('%Y', '2002-12-22') || ' years') >= date('now') then strftime('%Y', 'now') - strftime('%Y',

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
I think I got it now: select (date('now') - '2002-12-22') - ((julianday('now', '-' || (date('now') - '2002-12-22') || 'year') < julianday('2002-12-22'))) seems to work. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent:

Re: [sqlite] calculate age

2006-12-22 Thread Dennis Cote
RB Smissaert wrote: Thanks, it is getting close, but it doesn't quite work. For example this: select case when date('2002-12-22', '+' || strftime('%Y', 'now') - strftime('%Y', '2002-12-22') || ' years') >= date('now') then strftime('%Y', 'now') -

Re: [sqlite] calculate age

2006-12-22 Thread Dennis Cote
RB Smissaert wrote: I think I got it now: select (date('now') - '2002-12-22') - ((julianday('now', '-' || (date('now') - '2002-12-22') || 'year') < julianday('2002-12-22'))) seems to work. This is either clever or foolhardy depending upon how you

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Yes, thanks that works. Will do a bit of testing to see which one is the fastest. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:05 To: sqlite-users@sqlite.org Subject: Re: [sqlite] calculate age RB Smissaert wrote: > Thanks, it is

Re: [sqlite] calculate age

2006-12-22 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Is there a way to calculate the age given the 2 dates in the standard format > -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide > by 365, but that won't be accurate enough. > It would be easy to calculate the age in the

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
> This is either clever or foolhardy depending upon how you look at it. Probably the last, so will test a bit and then maybe switch to your method. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:17 To: sqlite-users@sqlite.org Subject: Re:

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Yes, a function like that would be useful. Unless I am mistaken I would have to wait though till the maker of my VB wrapper would incorporate it. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:26 To: sqlite-users@sqlite.org Subject:

RE: [sqlite] calculate age

2006-12-22 Thread RB Smissaert
Can confirm now that mine didn't work and yours does. Nice work! RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 22 December 2006 19:17 To: sqlite-users@sqlite.org Subject: Re: [sqlite] calculate age RB Smissaert wrote: > I think I got it now: > > select >

Re: [sqlite] sqlite web site performance

2006-12-22 Thread Florian Weimer
* w. wg: > The documents on sqlite official site says that sqlite can works fine > if a site's traciffic is under 10 click per day. But I found a > lot of sites ( including IBM developer network) say the number is only > 1 per day. Your are probably confusing the number of hits and