エラーメッセージ

ORA-01723: zero-length columns are not allowed 

対策

  • CREATE TABLE で CHAR(0) のような指定を行わない。
  • マテリアライズドビューの作成時に元テーブルのフィールドに NULL を設定しない。

ORA-01723: zero-length columns are not allowed エラー

もとのテーブルになく、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;
選択肢 投票
参考になった 35  
参考にならなかった 3  


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2024-04-24 (水) 09:16:25 (2d)