SnowConvert AI - Teradata - COMMON STATEMENTS¶
すべてのスクリプト構文に共通するTeradataスクリプト文をSnowflake SQL に変換するための変換リファレンス
ERROR HANDLING¶
BTEQ のエラー処理機能は、Teradataデータベースのエラーコードに基づいています。これらは、ユーザー指定のTeradata SQL ステートメントに応答して生成される標準エラーコードとメッセージです。BTEQ ユーザーは、これらのメッセージを変更、修正、削除することはできません。
For more information, see the Teradata BTEQ Error Handling documentation.
サンプルソースパターン¶
BTEQ エラー処理の基本例¶
The error conditions content is relocated in different statements in case ERRORCODE is different to zero, otherwise it can be located as the original code. First, the query above the if statement is relocated within a BEGIN - END block, where in case of an exception it will be caught in the EXCEPTION block. Additionally, the ERRORCODE variable will be changed to the variable declared indicating its SQLCODE with an EWI indicating that the exact number of the SQLCODE is not the same as the ERRORCODE in BTEQ.
Teradata BTEQ¶
Snowflake SQL¶
既知の問題¶
問題は見つかりませんでした。
EXIT または QUIT¶
すべてのデータベースセッションをログオフし、 BTEQ を終了します。
引数が明示的に与えられない限り、 BTEQ の実行中に発生した最も高い重大度値がデフォルトで BTEQ の戻りコード値として使用されます。(Teradata基本クエリリファレンス EXIT または QUIT コマンド)
サンプルソースパターン¶
基本的な IF 例¶
Teradata BTEQ¶
Snowflake SQL¶
既知の問題¶
EXIT またはQUIT コマンドに入力がない場合、デフォルトとして ERRORLEVEL を返す。しかし、SnowConvert AI はこれを0を返すように変換します。
関連 EWIs¶
SSC-FDM-TD0013: The Snowflake error code mismatches the original Teradata error code.
GOTO¶
説明¶
BTEQ Gotoコマンドは、指定されたラベルが表示されるまで、すべての介在する BTEQ コマンドや SQL ステートメントをすべてスキップし、通常どおり処理を再開します。(Teradata基本クエリリファレンスGotoコマンド)
サンプルソースパターン¶
基本的な GOTO 例¶
Snowflake scripting doesn't have an equivalent statement for Teradata BTEQ Goto command, but fortunately it can be removed from the input code and get an equivalent code, due to the sequence of Goto and Labels commands always in reverse topological order. In other words, the definitions come after their uses. Thus, SnowConvert AI just needs to copy bottom-up all Label section code to its corresponding Goto statements.
Teradata BTEQ¶
Snowflake¶
既知の問題¶
問題は見つかりませんでした。
関連 EWIs¶
SSC-EWI-0001: ソースコードの行に認識できないトークンがあります。
SSC-FDM-0027: Removed next statement, not applicable in Snowflake.
SSC-EWI-0073: 機能等価性レビュー保留中
[SSC-FDM-TD0026](../../../general/technical-documentation/issues-and-troubleshooting/functional-difference/teradataFDM.md#ssc-fdm-td0026):if文の反転により GOTO 文が削除されました。
IF... THEN...¶
説明¶
IF ステートメントは、条件を検証し、アクションが真の場合にアクションを実行します。(Teradata SQL 言語リファレンス IF...THEN...)
サンプルソースパターン¶
基本的な IF 例¶
Teradata BTEQ¶
Snowflake SQL¶
関連 EWIs¶
関連 EWIs はありません。