こんにちは、scriptella を使用して、dara を oracle データベースから postgresql データベースにコピーしています。できましたが、問題が 1 つあります。数値の列をコピーしたいのですが、最初のテーブルのコードが実際には数値ではない可能性があります。それが数値かどうかをテストしたいと思います。ヘルプ 。ここで私がしたこと
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
<description>
test script Pour table article
</description>
<connection id="in" driver="oracle"
url="jdbc:oracle:thin:@localhost:1521:XE" user="test" password="test" />
<connection id="out" driver="postgresql"
url="jdbc:postgresql://localhost:5432/testMonoprix2" user="postgres"
password="maher" />
<query connection-id="in">
SELECT CODE from test.TMP_FOURNISSEUR;
<script connection-id="out" if =" code is numeric" >
INSERT INTO public.suppliers
(code) values
(?CODE);
</script>
</query>
</etl>