0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

OracleAPEXでメタデータから項目を一括置換する

Last updated at Posted at 2024-05-20

初めに

OracleAPEXでアプリケーション内のアイテム名を一括置換したい時、sqlを全て修正したい時がありました。その際にエクスポートしたメタデータを書き換えてから取り込むことで一括置換が出来たので方法を紹介したいと思います。

前提

対話モード・レポートのtest111とテスト111という項目を置換しようと思います。

image.png

image.png

準備

一括置換したい対象のアプリケーションからSQL形式でエクスポートを行います。
この際、「複数のファイルに分割」のオプションをOFFにしておきます。

image.png

出力したファイルで検索を掛けて「test001」の方は見つけられましたが、test002の方はASCIIで変換された形になっています。

image.png

この場合以下のSQLを実行することで変換後と変換前の値を取得することが可能になります。

SELECT UNISTR ('変換前に戻したい文字列') FROM DUAL;

SELECT ASCIISTR('変換したい文字列') FROM DUAL;

\30C6\30B9\30C8111を入れて実行し「テスト111」が取得出来ました。

image.png

日本語を置換したい場合は以下のようにASCIIに変換して置換することが可能になります。
image.png

対象の一括置換を行いファイルを保存します。
image.png

アプリケーションのインポートを行い、値が変更されていることを確認出来ました。

image.png

以上となります。
見て下さりありがとうございました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?