I want to use forward statement as sub-query but obviously it fails. select * from table1 a join ( FORWARD TO server2 { sql-statement } ) as b on a.id = b.id Thanks |
It is used to send a complete SQL statement (or several ones) to a remote server. Therefore, you cannot use it as part of a query. However, what you are trying to do can be done with proxy tables - they are "linked remote tables" that can be used within queries with local tables - though there are some performance implications. can it at least insert the result of query from server2 to a temp table? and then join to temp table? I try to avoid proxy table. Basically, we have two sybase IQ servers which have same db schema and should have the same data in some tables. We want to compare data easily and make sure server2 has all the data. I want to left outer join server2 result to check if any data is missing on server2. I don't want to create too many proxy tables just for this.
(25 Mar '14, 11:44)
sqlgeek
Replies hidden
Comment Text Removed
|