"Igor Tandetnik" wrote...

On 5/30/2014 12:41 PM, jose isaias cabrera wrote:
What should be returned is
the value of vEmail of the first record that has Xtra4='y'

What do you mean by "first record"? Records are processed in no particular order.

Good point. I was, wrongly, thinking that it was top to bottom with the id. So, the idea is that once Xtra4='y' has provided a value, that is what I want. So, I think that because I am always getting 'noemail' then, it is caused because the last record read had Xtra4!='y'. So, this is not properly giving the result desired. So, how can I change this,

      CASE Xtra4 WHEN 'y' THEN vEmail ELSE 'noemail' END,

so that once I have a value from Xtra4='y', I want to keep that value as the result. Thanks.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to