
Details
This example creates a table from existing tables by using PROC FEDSQL and the
CREATE TABLE statement with the AS query expression syntax. The query expression
selects rows from existing tables to create the new table.
Program
libname mybase base 'C:\Base';
libname myspde spde 'C:\Spde';
libname myoracle oracle path=ora11g user=xxxxxx password=xxxxxx schema=xxxxxx;
proc fedsql;
create table mybase.results as
select product.prodid, product.product, customer.name,
sales.totals, sales.country
from myspde.product, myoracle.sales, myoracle.customer
where product.prodid = sales.prodid and
customer.custid = sales.custid;
select * from mybase.results; ...