I'll try it, but like I said, the query was working fine outside the procedure.
Printable View
I'll try it, but like I said, the query was working fine outside the procedure.
Only other thing that comes to mind is that whatever client you are using it in, has Languages or Locales or something in your query specified as a reserved word ?!!
After this I give up.
Ok, the latest attempt that hasn't worked:
Additional information - I'm attempting to execute this through Squirrel SQL Client using the Oracle Thin JDBC Driver. Could that be causing the problem?Code:CREATE OR REPLACE PROCEDURE transio.get_language_id
(p_language_id OUT INTEGER) IS
BEGIN
SELECT l.id
INTO p_language_id
FROM transio.languages l, transio.locales nls
WHERE l.locale_id = nls.id
AND nls.language_code = 'en'
AND nls.country_code = 'US';
END;
I don't think that's the problem, because I created the tables without any problems:Quote:
Originally posted by shibha
Only other thing that comes to mind is that whatever client you are using it in, has Languages or Locales or something in your query specified as a reserved word ?!!
Code:CREATE TABLE transio.locales
(
id INTEGER NOT NULL,
language_code CHAR(2) NULL,
country_code CHAR(2) NULL,
name VARCHAR2(255) NOT NULL
);
CREATE TABLE transio.languages
(
id INTEGER NOT NULL,
locale_id INTEGER NULL,
internal_string_id INTEGER NOT NULL
);
Hi
Maybe foolish..bit can you post your JDBC code here..
regards
Hrishy
There's no JDBC code. I'm executing the query in Squirrel SQL Client, which uses JDBC to connect. At this point, I'm thinking it's the client that's causing the problems, and working on other ways to connect to the database.
Thanks for your help, everyone :)