Consultor Eletrônico



Kbase P102112: SQL: Can SQL views be created from existing SQL views?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/10/2008
Status: Verified

GOAL:

SQL: Can SQL views be created from existing SQL views?

GOAL:

Can Progress SQL-92 views be created from existing Progress SQL-92?

GOAL:

Can OpenEdge SQL views be created from existing OpenEdge SQL views?

GOAL:

How to create an SQL view from an existing SQL view?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

Yes, an SQL-92 view can be created from one or more existing SQL-92 views. The following example creates the FirstView from the Customer table and the SecondView from the FisrtView:
1. Create the FirstView from the Customer table:
DROP VIEW FirstView;
CREATE VIEW FirstView
(
fNum, fname, fCity, fCountry
)
AS SELECT CustNum, Name, City, Country
FROM
pub.Customer;
COMMIT WORK;
2. Create the SecondView from the FisrtView:
DROP VIEW SecondView;
CREATE VIEW SecondView
(
sNum, sname
)
AS SELECT fNum, fName
FROM
FirstView;
COMMIT WORK;