Ok, I modified it to this:
Assuming "transio" is the owner of the tables "language" and "locales".Code:CREATE OR REPLACE PROCEDURE transio.get_language_id ( p_language_code IN CHAR, p_country_code IN CHAR, p_language_id OUT INTEGER ) IS BEGIN SELECT l.id INTO p_language_id FROM transio.languages l INNER JOIN transio.locales nls ON l.locale_id = nls.id WHERE nls.language_code = p_language_code AND nls.country_code = p_country_code; END;
Still not working :(
The query itself works, when I run it outside of a procedure.
What it's doing is retrieving a language_id for the ISO locale identifiers provided (language code and country code as in 'en, 'US').
This is really getting me down, because I know it should be simple.




Reply With Quote