I have a question I hope somebody will be able to help answer. I've worked almost exclusively with Oracle for almost 7 years, and now have to do some work on Sybase databases, but am struggling to accomplish some of the basic tasks.
The main goal is to write stored procedure/routing to merge identical tables from DIFFERENT databases, possibly on different servers.
The questions I have are:
1. How can I reference a table from another database in sql query?
In Oracle I can create database links, but how is it done in Sybase?
2. Next, I plan to do a row count comparison of each table in different databases (ex: DB1.TABLE_A and DB2.TABLE_A), and if they differe, run a reconciliation routine. Again, I Oracle I could have used MERGE statement and merge the tables based on a KEY field. Is there a similar statement available in Sybase?
I guess If I figure out how to read data from another database, I should be able to code the simple merge logic for item 2 above.
Look forward to your replies, and appologies for some basic questions.
1. In sybase u can have more than one databases in one database instance. So if other database is on the same instance then u can access the tables of another database as following
Suppose u r in database A and u want to access the table T of database B, then the quesry will be like
select * from B..T