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 assigned to this customer, so I
> don't need to enter every single one of them, and just assign the prefix,
> eg. "123" matches "1230001", "1230002", etc.
>
> Should I use the LIKE command for this? Does someone have an example to do
> this?
>

WHERE col LIKE '123%'

or WHERE substr(col,1, 3) = '123'
> Thank you.
>
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
>
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to