"Igor Tandetnik" wrote...

On 5/30/2014 4:43 PM, jose isaias cabrera wrote:
But I want,

1|d|270|190|80
2|f|298|248|50
3|i|140|115|25

or

1|d|270|190|80
2|g|298|248|50
3|i|140|115|25

Does it matter from which row (among those with Xtra4='y') vEmail comes? You were talking about the row with the smallest id, but your examples suggest that you don't really care. If in fact you don't care, then you can do something like this:

ifnull(max(case Xtra4 when 'y' then vEmail else null end), 'noemail')

This selects vEmail that would sort last in alphabetical order (replace max with min to select one that sorts first instead).

Yes, I don't really care about smallest id. So, this works perfectly. Thanks so much.

josé
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to