Reply to Re: problem with filtering data

Your name:

Reply:


Posted by Jerry Stuckle on 01/15/06 05:54

hubmei75@web.de wrote:
> Hello,
>
> I have a simple table containing adresses.
> A sample view of the table is
>
> id name city
> --------------------------------
> 100 Meier New York
> 101 Meier Tokyo
> 110 Olson Amsterdam
> 110 Olson Dublin
> 111 Paul Berlin
> ...
>
> The view is ordered by (name,city)
>
> Now my problem:
>
> I want to see only the second half of the view
> starting from "Olson" in "Dublin"
>
> Using the constraint
>
> where (name>="Olson") and (city>="Dublin")
>
> does not the right thing. It eliminates i.e. row 111.
> The only idea I have is to concatenate the fields to
> simulate the compound index to be able to do
>
> where name+"~"+city>="Olson~Dublin"
>
> not to forget to struggle with null fields to get
> the right results. This slows down the simple query
> dramatically.
>
> This seems to be a complicated solution for a simple
> problem, given the fact, that the index is already
> available at the server.
>
> Does anyone has an idea or suggestion?
>
> -Hubert
>

WHERE (name = 'Olson' AND city >= 'Dublin') OR name > 'Olson'

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация