RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Michael Evenson
ennedy [mailto:[EMAIL PROTECTED] > Sent: Monday, May 16, 2005 10:34 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Convert and isnumeric function > > > There's a former Nigeria dictator Charles Taylor that is even worse. > > Liberia! Not t

RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Dan Kennedy
> There's a former Nigeria dictator Charles Taylor that is even > worse. Liberia! Not that I could tell one from the other :) Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html

RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Michael Evenson
Message- > From: Cory Nelson [mailto:[EMAIL PROTECTED] > Sent: Sunday, May 15, 2005 1:36 PM > To: sqlite-users@sqlite.org > Cc: [EMAIL PROTECTED] > Subject: Re: [sqlite] Convert and isnumeric function > > for a nice speed increase (no strlen and only one pointer > d

Re: [sqlite] Convert and isnumeric function

2005-05-15 Thread Cory Nelson
t; } > default: { > sqlite3_result_int(context, 0); > break; > } > } > } > > > -Original Message- > > From: Wolfgang Rohdewald [mailto:[EMAIL PROTECTED] > > Sent: Saturday, May 14, 2005 8:39 AM > > To: sqlite-use

RE: [sqlite] Convert and isnumeric function

2005-05-15 Thread Michael Evenson
sqlite3_result_int(context, 0); break; } } } > -Original Message- > From: Wolfgang Rohdewald [mailto:[EMAIL PROTECTED] > Sent: Saturday, May 14, 2005 8:39 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Convert and isnumeric function >

RE: [sqlite] Convert and isnumeric function

2005-05-15 Thread Michael Evenson
rg > Subject: Re: [sqlite] Convert and isnumeric function > > On Samstag 14 Mai 2005 00:31, Michael Evenson wrote: > > case SQLITE_TEXT: { > > const char *z = sqlite3_value_text(argv[0]); > > for (i = 0; i < strlen (z); i++) { > >

Re: [sqlite] Convert and isnumeric function

2005-05-14 Thread Wolfgang Rohdewald
On Samstag 14 Mai 2005 00:31, Michael Evenson wrote: > case SQLITE_TEXT: { > const char *z = sqlite3_value_text(argv[0]); > for (i = 0; i < strlen (z); i++) { > if (!isdigit (z[i])) { > nResult = 0; > break; > } this should return FALSE for -5, 1

RE: [sqlite] Convert and isnumeric function

2005-05-13 Thread Michael Evenson
cType from WorldCheckData_Companies where isNumeric (cCompany) = 1 and cCompany != '.' Mike > -Original Message- > From: Jay Sprenkle [mailto:[EMAIL PROTECTED] > Sent: Friday, May 13, 2005 3:47 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Convert an

RE: [sqlite] Convert and isnumeric function

2005-05-13 Thread Michael Evenson
Here is the isnumeric function. Don't forget to add the line to the sqlite3RegisterBuiltinFunctions function. { "isnumeric", 1, 0, SQLITE_UTF8,0, isnumericFunc}, I put it right after the abs function declartation /* ---

Re: [sqlite] Convert and isnumeric function

2005-05-13 Thread Jay Sprenkle
> All or any, > > Has anyone implemented these as built in functions in sqlite 3? If > not - I was thinking of doing it and submitting to the sqlite.org web site > for submission. The api converts data types for you. Isnumeric might be useful but since the database isn't strongly typed it

[sqlite] Convert and isnumeric function

2005-05-13 Thread Michael Evenson
All or any, Has anyone implemented these as built in functions in sqlite 3? If not - I was thinking of doing it and submitting to the sqlite.org web site for submission. Mike