But got this error :
ORA-00942: table or view does not exist: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM dc_dossier ) raw_sql_
where rownum <= 1) where raw_rnum_ > 0 (ActiveRecord::StatementInvalid)
I googled a bit and found that i should try to add that to the Credit
class :
connection.execute(‘alter session set current_schema=DCFPROD’)
Got that :
OCIError: ORA-01435: user does not exist: alter session set
current_schema=DCFPROD (ActiveRecord::StatementInvalid)
I’m clueless. I don’t know much about Oracle.
Is there someone with an idea ?
THX.
Thanks for your answer.
But, so far no luck.
I added that line
connection.execute(‘alter session set current_schema=scott’)
Got the first error message :
ORA-00942: table or view does not exist: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM dc_dossier ) raw_sql_
where rownum <= 1) where raw_rnum_ > 0 (ActiveRecord::StatementInvalid)
Tried to add the :database parameter to the connection. No luck.
Does someone ahve another idea ?
Le 16 novembre à 10:16, Nicolas Couturier a écrit :
Got the first error message :
ORA-00942: table or view does not exist: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM dc_dossier ) raw_sql_
where rownum <= 1) where raw_rnum_ > 0 (ActiveRecord::StatementInvalid)
Tried to add the :database parameter to the connection. No luck.
Does someone ahve another idea ?
Well, at first, try to connect to the DB with a query tool (using the
same password and user than rails, of course), and execute the query as
given in the logs. Then, if it doesn’t work, try to “decapsulate” it
step by step :
select * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM
dc_dossier ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0
select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM dc_dossier)
SELECT * FROM dc_dossier
It may give you a hint of what’s wrong (especially the precise Oracle
error).
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.