473,408 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

materialized view. help...

Hi all,

I've been digging this problem almost 3 days now.

I created some 'normal' views and then join them all together to
create a materialized view but I got this error message:

"Subquery expressions not allowed here"

I use subqueries *only* in 'normal' views.

any comments, advice really appreciated.

many thanks
anthony
Jul 19 '05 #1
2 4953
thanks Daniel

oracle9i - 9.2.0.3.0

materialize view - I just use default option - I'm a newbie in this
area:

create materialized view test_mv as
select * from security1_view

==============
one of my view is like this - it's about a loan - one policy can have
many securities, and one security can be valuated many times:

CREATE OR REPLACE FORCE VIEW WHSEOWNER.SECURITY1_VIEW
(SEC1_POL_NO, PP_PC_EV1, NO_VAL_DECISION1, MORTGAGE_RANK1, SEC_TYPE1,
SEC_TYPE_STATUS1, OCC_TYPE1, ZONING1, TITLE_TYPE1, SECURITY_ACC1,
THIRD_PARTY1, VALUATION_PROGRAM1, VAL_AMT1, VAL_DATE1, VALUER_NO1,
LAND_AREA1, NO_BEDROOMS1, SECURITY_ADD1, SECURITY_STATE1,
SECURITY_POSTCODE1,
SEC_CREATED_DT)
AS
select
dwh_policies.pol_policy_no as sec1_pol_no,
dwh_securities.sec_pp_pc_ev as pp_pc_ev1,
dwh_securities.sec_no_val_decision as no_val_decision1,
dwh_securities.sec_mortgage_rank as mortgage_rank1,
dwh_securities.sec_type as sec_type1,
dwh_securities.sec_type_status as sec_type_status1,
dwh_securities.sec_occupancy_type as occ_type1,
dwh_securities.sec_zoning as zoning1,
dwh_securities.sec_title_type as title_type1,
dwh_securities.sec_acceptable_ind as security_acc1,
dwh_securities.sec_third_party_ind as third_party1,

(select val_program from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as valuation_program1,

(select val_amount from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as val_amt1,

(select val_date from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as val_date1,

(select val_valuer_no from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as valuer_no1,

(select val_land_area from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as land_area1,

(select val_no_bedrooms from dwh_valuations where val_id = (select
max(val1.val_id) from dwh_valuations val1 where
val1.val_sec_id = dwh_securities.sec_id)) as no_bedrooms1,

dwh_addresses.add_address as security_add1,
dwh_addresses.add_state as security_state1,
dwh_addresses.add_postcode as security_postcode1,
sec_created_dt
from dwh_policies
left outer join dwh_applications on dwh_policies.pol_id =
dwh_applications.app_pol_id
left outer join dwh_securities on dwh_securities.sec_app_id =
dwh_applications.app_id
left outer join dwh_addresses on dwh_addresses.add_id =
dwh_securities.sec_add_id
where dwh_securities.sec_sequence= 1;


da*************@hotmail.com (Daniel Roy) wrote in message news:<37************************@posting.google.co m>...
No one will be able to help you unless we know your version, and the
definition behind these views and this matialized view.

Daniel

Jul 19 '05 #2
According to what I see in the Data Warehouse manual
(http://download-west.oracle.com/docs...20/mv.htm#721),
inline views (i.e. what you try) is only possible in the FROM clause
of the MV definition, and not in the SELECT clause, as you are trying.

Daniel
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Prashant | last post by:
Hi I have a problem with refreshing of Mviews , I will narrate every thing step by step: 1.create table a (a number); 2.insert into table a values(&a); (after inserting 2 rows and commiting)...
1
by: Matthieu Exbrayat | last post by:
Hie all, I am currently using materialized views within Oracle 9i. For instance I create mv1 on DB bddist2, as a snapshot of sur1 on bddist1 : SQL> create materialized view mv1 2 refresh...
3
by: M. Mehta | last post by:
It seems that you can not create a materialized view if you are using outer joins...can someone please verify this? Thanks M. Mehta Please follow my example below: created 2 tables:
6
by: Vincent LIDOU | last post by:
Do not trust values returned by materialized views under SQL Server without frequently checking underlying tables!!! I already posted this message under microsoft.public.sqlserver.server and I'm...
1
by: Hans-Jürgen Schönig | last post by:
hello ... i am running into a couple of questions regarding materialized view logs. my goal is to take data from an oracle database and replicate it to some remote data store (maybe some other...
7
by: Esteban Kemp | last post by:
PostgreSql support materialized views ??? if not, there is something similar?? Thanks Esteban kemp
1
by: rumasinha | last post by:
Hi, I first created a materialized view that was based on the org striped views like po_headers hence the automatic refresh was not happening. After automatic complete refresh, the materialized...
2
by: Preeti Bajaj | last post by:
I created a materialized view log on table DUMMY_TAB as shown below: create materialized view log on DUMMY_TAB with primary key including new values; Primary key for the table DUMMY_TAB is...
3
by: kewldotnet | last post by:
I have a query thats taking long time to execute. So i have created a Materialized view to refresh it every hour. But when the Materialized view is being refreshed, there is no data in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.