Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating a view using with clause

user13360241Dec 22 2014 — edited Dec 22 2014

Hi,

I am creating a view using with clause consisting of multiple queries. Both of the queries/tables have different structures.

My requirement is some time  Iam calling Query-1 and some time Query-2. I may added few more queries later on.

Query-1 =spg   (Alias name)

Query2=Userst    (Alias name)

CREATE or Replace VIEW MyView AS

WITH  spg AS

(SELECT * FROM simpgra),

Userst as (SELECT * FROM userx)

select * from Userst

How can i select different queries with different times. As above i can select only one at a time.

Please if you any alternate solution, kindly help.

Thanks.

BR

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2015
Added on Dec 22 2014
6 comments
1,620 views