RE: [sqlite] Using LIKE to check the first digits?

2008-02-01 Thread Griggs, Donald
Regarding: >>Indices won't help with LIKE unless the column as a NOCASE collation. Use GLOB instead: >> ... WHERE number GLOB '1234*'; >>Note that "*" is the wildcard character with GLOB, not "%" >>as in LIKE. The above will use an index on the number column if it is available.

RE: [sqlite] Using LIKE to check the first digits?

2008-02-01 Thread Samuel R. Neff
a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -Original Message- From: P Kishor [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 9:28 PM To: sqlite-users@sqlite.org Su

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread P Kishor
On 1/31/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Gilles <[EMAIL PROTECTED]> wrote: > > At 15:40 31/01/2008 -0800, James Dennett wrote: > > > > WHERE col LIKE '123%' or WHERE substr(col,1, 3) = '123' > > > > > >The optimizer has a decent chance of using an index for LIKE '123%' but > > >I'

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread Gilles
At 02:01 01/02/2008 +, [EMAIL PROTECTED] wrote: Indices won't help with LIKE unless the column as a NOCASE collation. Use GLOB instead: ... WHERE number GLOB '1234*'; Thank you for the tip. - To unsubscribe, s

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread drh
Gilles <[EMAIL PROTECTED]> wrote: > At 15:40 31/01/2008 -0800, James Dennett wrote: > > > WHERE col LIKE '123%' or WHERE substr(col,1, 3) = '123' > > > >The optimizer has a decent chance of using an index for LIKE '123%' but > >I'd be surprised (and impressed) if it looks inside function calls suc

RE: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread Gilles
At 15:40 31/01/2008 -0800, James Dennett wrote: > WHERE col LIKE '123%' or WHERE substr(col,1, 3) = '123' The optimizer has a decent chance of using an index for LIKE '123%' but I'd be surprised (and impressed) if it looks inside function calls suchas substr for opportunities to use indexes.

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread Scott Baker
Gilles wrote: Hello I'm no SQL guru, and need to look up phone numbers in a SQLite database that start with certain digits. Some customers use http://en.wikipedia.org/wiki/Direct_Inward_Dialing, which means that the first part is common to all the numbers assigned to this customer, so I don'

RE: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread James Dennett
> -Original Message- > From: P Kishor [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 31, 2008 3:35 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Using LIKE to check the first digits? > > On 1/31/08, Gilles <[EMAIL PROTECTED]> wrote: > > H

Re: [sqlite] Using LIKE to check the first digits?

2008-01-31 Thread P Kishor
On 1/31/08, Gilles <[EMAIL PROTECTED]> wrote: > Hello > > I'm no SQL guru, and need to look up phone numbers in a SQLite database > that start with certain digits. Some customers use > http://en.wikipedia.org/wiki/Direct_Inward_Dialing, which means that the > first part is common to all the numbers

[sqlite] Using LIKE to check the first digits?

2008-01-31 Thread Gilles
Hello I'm no SQL guru, and need to look up phone numbers in a SQLite database that start with certain digits. Some customers use http://en.wikipedia.org/wiki/Direct_Inward_Dialing, which means that the first part is common to all the numbers assigned to this customer, so I don't need to enter

[sqlite] Using Like

2006-04-13 Thread Roger
hwo do i use LIKE in sqlite eg in Select Surname from people where surname like A* etc.