Hi
I havent used MQT before. Read the online tips and tutorials but none
seems to give any hint for my problem.
I have a base table (base_table) as:
st varchar(25) default 'my_null'
dt timestamp default
'1900-01-01-00.00.00.00000'
num integer default -999999
My requirement is that for any of these default value in base table,
null should be populated in the materialized view.
I tried the following to create a mqt:
CREATE TABLE OUT_table AS (SELECT
CASE DT WHEN
'1900-01-01-00.00.00.000000 ' THEN null ELSE DT END DT,
CASE NUM WHEN -999999 THEN null ELSE NUM END NUM,
CASE ST WHEN 'my_null' THEN null ELSE ST END ST FROM
base_table)
DATA INITIALLY DEFERRED REFRESH DEFERRED
Then tried creating the staging table:
create table m_out_table for out_table propagate
immediate
This gave me error: SQL20058N The fullselect specified for the
materialized query table "test.OUT_table " is not valid. Reason code =
"7
Can, the thing that I am trying to do (put null values for 'my_null'
etc), be done? If yes, how?
Thanks.
I havent used MQT before. Read the online tips and tutorials but none
seems to give any hint for my problem.
I have a base table (base_table) as:
st varchar(25) default 'my_null'
dt timestamp default
'1900-01-01-00.00.00.00000'
num integer default -999999
My requirement is that for any of these default value in base table,
null should be populated in the materialized view.
I tried the following to create a mqt:
CREATE TABLE OUT_table AS (SELECT
CASE DT WHEN
'1900-01-01-00.00.00.000000 ' THEN null ELSE DT END DT,
CASE NUM WHEN -999999 THEN null ELSE NUM END NUM,
CASE ST WHEN 'my_null' THEN null ELSE ST END ST FROM
base_table)
DATA INITIALLY DEFERRED REFRESH DEFERRED
Then tried creating the staging table:
create table m_out_table for out_table propagate
immediate
This gave me error: SQL20058N The fullselect specified for the
materialized query table "test.OUT_table " is not valid. Reason code =
"7
Can, the thing that I am trying to do (put null values for 'my_null'
etc), be done? If yes, how?
Thanks.
Comment