Re: [ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hans-Jürgen Schönig
hello ... read this: ERROR: type "number" does not exist we don't have this type. use numeric or whatever matches. many thanks, hans On May 11, 2011, at 2:46 PM, Hsien-Wen Chu wrote: > ERROR: type "number" does not exist -- Cybertec Schönig & Schönig GmbH Gröhrmü

Re: [ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hsien-Wen Chu
Hi Hans Many many thanks, I have executed the SQL, how ever, it does not work, I don't know what's wrong tora=# select * FROM odbclink.query(1, 'SELECT * FROM test') as result(user_name text,score number); ERROR: type "number" does not exist LINE 1: ...SELECT * FROM test') as result(user_name

Re: [ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hans-Jürgen Schönig
hello ... in SQL this "*" has to be known at parsing time ... so, it needs the number / type of columns before doing anything else. as you select "some" data from oracle (the postgres parser does not look into the oracle sql) you have to tell the system which data to expect. it is somehow like t

Re: [ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hans-Jürgen Schönig
hello ... oh, it seems you did not get that one: select * FROM odbclink.query(1, 'SELECT * FROM test') as result(user_name text,score number); give it a try ;). hans On May 11, 2011, at 12:24 PM, Hsien-Wen Chu wrote: > Hi Hans > > many thanks for the answer, > > my table structur

Re: [ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hsien-Wen Chu
Hi Hans many thanks for the answer, my table structure on Oracle, but I still get error as following, Please could show me the correct SQL statement? many many thanks Hsien-Wen SQL> desc test; Name Null?Type --

[ADMIN] Question about odbc link to Oracle database from PostgreSQL

2011-05-11 Thread Hsien-Wen Chu
Dear All I have a question regarding to odbc link, I had a PostgreSQL database and an Oracle database, now I have created a dblink to Oracle database base on odbc link. in Oracle database, I created a user named ORATEST, and create a table named TEST as ORATEST user. SQL> select user_name,sco