- 追加された行はこの色です。
- 削除された行はこの色です。
#navi(ORACLE)
**エラーメッセージ [#ea5352d8]
ORA-01723: zero-length columns are not allowed
**対策 [#qe07e86c]
-CREATE TABLE で CHAR(0) のような指定を行わない。
-マテリアライズドビューの作成時に元テーブルのフィールドに NULL を設定しない。
**ORA-01723: zero-length columns are not allowed エラー [#i37c1b28]
もとのテーブルになく、MView に必要なフィールドに NULL を指定すると発生する。
固定文字列や、数値などを指定しエラーを回避する。
(データの型がわからないのだから当然と言えば当然。ただ「データの型が不明です。」というようなもう少しわかりやすいメッセージにしてほしいものだ。)
悪い例
create materialized view materialized_view_name
refresh complete on demand
as
select
FieldA as OtherTableFieldA,
FieldB as OtherTableFieldB,
NULL as OtherTableFieldC
from OtherTable@ServiceName;
修正例
create materialized view materialized_view_name
refresh complete on demand
as
select
FieldA as OtherTableFieldA,
FieldB as OtherTableFieldB,
' ' as OtherTableFieldC
from OtherTable@ServiceName;
#vote(参考になった[23],参考にならなかった[1])
#vote(参考になった[23],参考にならなかった[2])