Re: [sqlite] instr function or equivalent

2012-09-11 Thread Bart Smissaert
Hi Olaf, I think it should be: Select Left$(TheField, Instr(TheField,']')) From Tbl Have tested you new dll's and all working fine as usual. Bart On 9/11/12, Olaf Schmidt wrote: > Am 10.09.2012 17:17, schrieb Bart Smissaert: >> Ah, OK. I have a feeling that needs to be done

Re: [sqlite] instr function or equivalent

2012-09-11 Thread Bart Smissaert
Hi Olaf, Yes, I am aware of those functions in your COM wrapper and I am using them. Was just thinking in general terms as not many users on this forum use VB. Great news about the new version and will download and test that today. Thanks for that. Bart On 9/11/12, Olaf Schmidt

Re: [sqlite] instr function or equivalent

2012-09-11 Thread Olaf Schmidt
Am 10.09.2012 17:17, schrieb Bart Smissaert: Ah, OK. I have a feeling that needs to be done either in your application code or with a user defined SQLite function. Somebody may prove me wrong. Hi Bart, since I know you're using my COM-Wrapper, a larger set of Functions (in "VBA-Style",

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Igor Tandetnik
On 9/10/2012 1:22 PM, kball...@kennethballard.com wrote: Here's one that I wrote a while back: void sqlite3_instr(sqlite3_context* pContext, int argc, sqlite3_value** argv) { const char *str1 = (const char *) sqlite3_value_text(argv[0]); const char *str2 = (const char *)

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Petite Abeille
On Sep 10, 2012, at 4:21 PM, Sébastien Roux wrote: > I'm looking for the[in]famous sqlite "*instr"* function which doesn't exist > (searched the web so far without success). Also searched for a > "*position"*function, without success too! > > Any idea or help? I found

Re: [sqlite] instr function or equivalent

2012-09-10 Thread kball...@kennethballard.com
Here's one that I wrote a while back: void sqlite3_instr(sqlite3_context* pContext, int argc, sqlite3_value** argv) { const char *str1 = (const char *) sqlite3_value_text(argv[0]); const char *str2 = (const char *) sqlite3_value_text(argv[1]); char *p = strstr(str1, str2); int

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Igor Tandetnik
On 9/10/2012 12:45 PM, Simon Slavin wrote: Similar but it only every has to (recursively) look at the rightmost character. 'instr' has to be able to look at substrings all the way along the string. So does replace(), which SQLite does implement. -- Igor Tandetnik

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Carlos Milon Silva
Hi, You could check the sqlite extensions from www.monkeybreadsoftware.de at: http://www.monkeybreadsoftware.de/SQLiteExtension/functions.shtml Best Regards, Carlos. Em 10/09/2012 10:21, Sébastien Roux escreveu: Hi, I'm looking for the[in]famous sqlite "*instr"* function which doesn't exist

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Simon Slavin
On 10 Sep 2012, at 5:43pm, Bart Smissaert wrote: > Yes, but doesn't rtrim do an instr function with the same problems as > you mention? Similar but it only every has to (recursively) look at the rightmost character. 'instr' has to be able to look at substrings all

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
Yes, but doesn't rtrim do an instr function with the same problems as you mention? RBS On 9/10/12, Simon Slavin wrote: > > On 10 Sep 2012, at 5:36pm, Bart Smissaert wrote: > >> Yes, you are right there. >> As rtrim incorporates an instr type of

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Simon Slavin
On 10 Sep 2012, at 5:36pm, Bart Smissaert wrote: > Yes, you are right there. > As rtrim incorporates an instr type of function I am not sure why there > is no plain instr function in SQLite. It would make things a bit simpler. Two ways to add appropriate functions to

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
___ > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on > behalf of Bart Smissaert [bart.smissa...@gmail.com] > Sent: Monday, September 10, 2012 11:19 AM > To: General Discussion of SQLite Database > Subject: EXT :Re: [sqlite] instr function or equiva

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Black, Michael (IS)
f of Bart Smissaert [bart.smissa...@gmail.com] Sent: Monday, September 10, 2012 11:19 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] instr function or equivalent This is slightly faster: select rtrim(s,' from [.0123456789]') || ']' from t RBS On 9/10/12, Bart Smissaert <ba

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
gt; Advanced Analytics Directorate >> Advanced GEOINT Solutions Operating Unit >> Northrop Grumman Information Systems >> >> ________ >> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] >> on >> behalf of Sébastien R

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
ientist > Advanced Analytics Directorate > Advanced GEOINT Solutions Operating Unit > Northrop Grumman Information Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on > behalf of Sébastien Roux [roux.sebast...@gmail.com] &g

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
ientist > Advanced Analytics Directorate > Advanced GEOINT Solutions Operating Unit > Northrop Grumman Information Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] > on behalf of Sébastien Roux [roux.sebast...

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Black, Michael (IS)
on behalf of Sébastien Roux [roux.sebast...@gmail.com] Sent: Monday, September 10, 2012 10:22 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] instr function or equivalent Sad! Would you have any link toward SQLite's user defined SQLit

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
Sad! Would you have any link toward SQLite's user defined SQLite function? Many thanks. Sébastien Roux 2012/9/10 Bart Smissaert > Ah, OK. I have a feeling that needs to be done either in your application > code > or with a user defined SQLite function. > Somebody

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
Ah, OK. I have a feeling that needs to be done either in your application code or with a user defined SQLite function. Somebody may prove me wrong. RBS On 9/10/12, Sébastien Roux wrote: > I want to remove/trim characters strating from "from" til "]" > > Logging in

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
I want to remove/trim characters strating from "from" til "]" Logging in user [aa] from [10.165.69.247] 194|2012-09-07|Logging in user [a] from [10.296.44.163] 160|2012-09-04|Logging in user [aaa] from [10.164.69.248] 136|2012-09-07|Logging in user [aaa] from [10.168.59.169]

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
Could your application supply the values in code? What exactly are you trying to do? RBS On 9/10/12, Sébastien Roux wrote: > Thanks Bart but substr require hard coded positions I guess, I need to get > this position dynamically! > > Sébastien Roux > > 2012/9/10 Bart

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
Thanks Bart but substr require hard coded positions I guess, I need to get this position dynamically! Sébastien Roux 2012/9/10 Bart Smissaert > http://www.sqlite.org/lang_corefunc.html > > Look at substr > > > RBS > > > On 9/10/12, Sébastien Roux

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
http://www.sqlite.org/lang_corefunc.html Look at substr RBS On 9/10/12, Sébastien Roux wrote: > Hi, > > I'm looking for the[in]famous sqlite "*instr"* function which doesn't exist > (searched the web so far without success). Also searched for a >

[sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
Hi, I'm looking for the[in]famous sqlite "*instr"* function which doesn't exist (searched the web so far without success). Also searched for a "*position"*function, without success too! Any idea or help? I found some threads about custom functions but no tutorial nor deeper explanations! Many