I need to obtain the last two digits of an integer. Each element placed in the tables comes as a full year ie. YYYY and I only want the last two digits, so that all the fields show
YEAR
----
09
00
89
where the initialy field was
YEAR
----
2009
2000
1989
EDIT: I get a complaint saying,
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
when i try
select right(cast(year as char),2) from subjects;
Postgres has borrowed (or inherited) the modulus operator from C:
Result: