Howdy:
Running Postgres 7.1.3 on RedHat Linux 7.2 kernel
2.4.7 - rev 10.
This has probably asked done a million times over,
but I can't seem to find the examples:
I want to do basic math on a data field (get the
difference in years) but can't find the example
to do it.
What I want is something like:
[pseudo code]
select
name,
dob,
case
when now() - dob > '21'
then 'legal'
when now() - dob > '18'
then 'no drinking'
else 'youths'
end as identify
from temp_table
;
[/pseudo code]
Are there any examples like this?
Thanks!
-X