Yes, thanks had just figured that out the same.
Working fine now.

RBS


On Tue, Feb 7, 2012 at 11:17 PM, Richard Hipp <[email protected]> wrote:
> On Tue, Feb 7, 2012 at 6:14 PM, Bart Smissaert 
> <[email protected]>wrote:
>
>> Have a table with an integer age field and a text age_group field.
>> Need to update the age_group field according to the age.
>> Tried with several case when constructions, but sofar nil working, eg:
>>
>> update pats set age_group =
>> (case
>> when age between(0 and 9) then '0 to 9'
>> when age between(10 and 19) then '10 to 19'
>> when age between(20 and 29) then '20 to 29'
>> when age between(30 and 39) then '30 to 39'
>> when age between(40 and 49) then '40 to 49'
>> when age between(50 and 59) then '50 to 59'
>> when age between(60 and 69) then '60 to 69'
>> when age between(70 and 79) then '70 to 79'
>> when age between(80 and 89) then '80 to 89'
>> when age between(90 and 99) then '90 to 99'
>> when age > 99 then '100 and above'
>> end)
>>
>> How can this be done?
>>
>
> Omit the parentheses
>
>
>>
>> RBS
>> _______________________________________________
>> sqlite-users mailing list
>> [email protected]
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> D. Richard Hipp
> [email protected]
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to