跨多个数据源的J2EE开发: 细节探讨 - 编程入门网
odbc_partsupp.*, ''xls'' AS ps_server
FROM odbc_partsupp;
--
DROP VIEW fed_supplier;
CREATE VIEW fed_supplier AS
SELECT db2_supplier.*, ''db2'' AS s_server
FROM db2_supplier
UNION ALL
SELECT ora_supplier.*, ''ora'' AS s_server
FROM ora_supplier
UNION ALL
SELECT odbc_supplier.*, ''xls'' AS s_server
FROM odbc_supplier;
--
DROP VIEW fed_nation;
CREATE VIEW fed_nation AS
SELECT db2_nation.*, ''db2'' AS n_server
FROM db2_nation
UNION ALL
SELECT ora_nation.*, ''ora'' AS n_server
FROM ora_nation
UNION ALL
SELECT odbc_nation.*, ''xls'' AS n_server
FROM odbc_nation;
--
-- for query #3
DROP VIEW fed_customer;
CREATE VIEW fed_customer AS
SELECT db2_customer.*, ''db2'' AS c_server
FROM db2_customer
UNION ALL
SELECT ora_customer.*, ''ora'' AS c_server
FROM ora_customer
UNION ALL
SELECT odbc_customer.*, ''xls'' AS c_server
FROM odbc_customer;
--
DROP VIEW fed_orders;
CREATE VIEW fed_orders AS
SELECT db2_orders.*, ''db2'' AS o_server
FROM db2_orders
UNION ALL
SELECT ora_orders.*, ''ora'' AS o_server
FROM ora_orders
UNION ALL
SELECT odbc_orders.*, ''xls'' AS o_server
FROM odbc_orders;
跨多个数据源的J2EE开发: 细节探讨(14)时间:2011-04-11 IBM C. M. Saracco附录 B. 直接数据访问的辅助表定义 我们在一个本地 DB2 Information Integrator 数据库中创建了辅助表,来保存直接对 目标数据源(Oracle、DB2 UDB 和 Excel)执行的查询所返回的中间结果集。以下是对我 们创建的每个辅助表的定义。
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |