Firebird - how to create a view with select command to external data source?
-
Hello! I will create a view on a Firebird database server by using the Execute Statement "ON EXTERNAL DATA SOURCE". I found this document on firebirdfaq.org: http://www.firebirdfaq.org/faq16/ and also this: http://tech.groups.yahoo.com/group/firebird-support/message/114481 Unfortunately my SQL-skills are not good enough to solve this task by my selves. I tried this:
SELECT * FROM(
FOR EXECUTE STATEMENT
'select code, name from TMaster where group = 'A' '
ON EXTERNAL DATA SOURCE '[IP Adrress]:\Data\DB\master.fdb' AS USER 'u' PASSWORD
'p' ROLE 'R'
into :code, :name do suspend ;)Certainly that doesn't run. :~ Please can anybody give me some interesting advises? I look forward to all suggestions! Kind regards Christoph
I'm a novice from Germany.
-
Hello! I will create a view on a Firebird database server by using the Execute Statement "ON EXTERNAL DATA SOURCE". I found this document on firebirdfaq.org: http://www.firebirdfaq.org/faq16/ and also this: http://tech.groups.yahoo.com/group/firebird-support/message/114481 Unfortunately my SQL-skills are not good enough to solve this task by my selves. I tried this:
SELECT * FROM(
FOR EXECUTE STATEMENT
'select code, name from TMaster where group = 'A' '
ON EXTERNAL DATA SOURCE '[IP Adrress]:\Data\DB\master.fdb' AS USER 'u' PASSWORD
'p' ROLE 'R'
into :code, :name do suspend ;)Certainly that doesn't run. :~ Please can anybody give me some interesting advises? I look forward to all suggestions! Kind regards Christoph
I'm a novice from Germany.
-
You are going from firebird to firebird right? When you say it doesn't "run" what do you mean exactly?
Hi! Thanks a lot for your reply! You are going from firebird to firebird right? Yes I do. When you say it doesn't "run" what do you mean exactly? It is not possible to compile my SQL example:
SELECT * FROM(
FOR EXECUTE STATEMENT
'select code, name from TMaster where group = 'A' '
ON EXTERNAL DATA SOURCE '[IP Adrress]:\Data\DB\master.fdb' AS USER 'u' PASSWORD
'p' ROLE 'R'
into :code, :name do suspend ;)I got a SQL-Error in Line 2. If I try to compile without the select command I got the error in line 1. I suppose my way to use the "FOR EXECUTE STATEMENT" is not correct. Or do I have problems with my Firebird version? (I don't know my current version at the moment, tomorrow)
I'm a novice from Germany.
-
Hi! Thanks a lot for your reply! You are going from firebird to firebird right? Yes I do. When you say it doesn't "run" what do you mean exactly? It is not possible to compile my SQL example:
SELECT * FROM(
FOR EXECUTE STATEMENT
'select code, name from TMaster where group = 'A' '
ON EXTERNAL DATA SOURCE '[IP Adrress]:\Data\DB\master.fdb' AS USER 'u' PASSWORD
'p' ROLE 'R'
into :code, :name do suspend ;)I got a SQL-Error in Line 2. If I try to compile without the select command I got the error in line 1. I suppose my way to use the "FOR EXECUTE STATEMENT" is not correct. Or do I have problems with my Firebird version? (I don't know my current version at the moment, tomorrow)
I'm a novice from Germany.
My version is ok (2.5.2) So my SQL must be incorrect. Is my example basicly possible?
I'm a novice from Germany.