Re: [sqlite] Instr(x, y, z) ?

2019-05-14 Thread Bart Smissaert
he second part of the coalesce. > > full_strlooking_for instance_no instance_start > ------ --- --- -- > Here kitty kitty kitty kitty40 > > > > > -Original Message- > From: sq

Re: [sqlite] Instr(x, y, z) ?

2019-05-14 Thread David Raymond
want, just make it the second part of the coalesce. full_strlooking_for instance_no instance_start -- --- --- -- Here kitty kitty kitty kitty40 -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On B

[sqlite] Instr(x, y, z) ?

2019-05-14 Thread Bart Smissaert
Is it possible with the existing SQL core string functions to find the position of occurrence z of string y in string x? The standard Instr function only does this for the first occurrence, but I would like to specify the second, third, fourth etc. occurrence of the specified string. As this is wit

[sqlite] instr() documentation error

2012-12-21 Thread Bernd
I think there is a documentation error on http://sqlite.org/lang_corefunc.html for the instr() function. The site says: The instr(X,Y) function finds the first occurrence of string X within string Y ... where it should be ...finds the first occurrence of string Y within string X... Thanks, Ber

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 either in your >>

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 wrote: > Am 10

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", similar

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 *) sqlite3_value_

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 id

Re: [sqlite] instr function or equivalent

2012-09-10 Thread kball...@kennethballard.com
;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 > "*position"*function, without success too! > > Any idea or help? I

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 whic

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 the way along the string.

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 function I am not sure why there >> is no plain

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 SQLite to do it. Either su

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 f

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Black, Michael (IS)
@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 equivalent This is slightly faster: select rtrim(s,' from [.01234567

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
r Scientist >> Advanced Analytics Directorate >> Advanced GEOINT Solutions Operating Unit >> Northrop Grumman Information Systems >> >> >> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun..

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
in user [aaa] > > Michael D. Black > Senior Scientist > 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ébastie

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
in user [aaa] > > Michael D. Black > Senior Scientist > 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

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Black, Michael (IS)
om: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] 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 equiv

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
anks 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/la

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
ut 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 >> >> &

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
substr > >> > >> > >> RBS > >> > >> > >> On 9/10/12, Sébastien Roux wrote: > >> > Hi, > >> > > >> > I'm looking for the[in]famous sqlite "*instr"* function which doesn't > >>

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Bart Smissaert
issaert > >> 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

Re: [sqlite] instr function or equivalent

2012-09-10 Thread Sébastien Roux
i, > > > > 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?

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

Re: Re: [sqlite] Instr, Locate or Splite

2005-10-20 Thread debra f
Unfortunately, it's not always the same length (nor the same chars) and the case statement could be slightly unwieldy. I may have to resort to that anyway. Thanks Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.

Re: [sqlite] Instr, Locate or Splite

2005-10-17 Thread Dennis Cote
debra f wrote: I'm trying to determine how (if possible without writing extension) to split a single column by a character value - for example Column AgeRange has values such as 20-30, 40-50 I'd like to do something like... select substr(agerange,1,instr(agerange,'-')-1) as StartAge, substr(a

[sqlite] Instr, Locate or Splite

2005-10-17 Thread debra f
I'm trying to determine how (if possible without writing extension) to split a single column by a character value - for example Column AgeRange has values such as 20-30, 40-50 I'd like to do something like... select substr(agerange,1,instr(agerange,'-')-1) as StartAge, substr(agerange,instr(ager

[sqlite] INSTR

2004-10-26 Thread Drew, Stephen
Hello,   Is there a similar function in standard SQLite?  I've had a quick scan of the documentation and it seems like there isn't, but I thought I'd double-check.   Thanks in advance, Stephen Drew