Tips

SQLステートメントにコメント文を挿入する

日付2008/12/01
ID08-077
バージョン11.0
プラットフォームMac / Win

SQLステートメントにおけるコメント文は、/*と*/の間に記述します。

C_TEXT($vName;$vresult)
C_Pointer($name_p)


BEGIN SQL
        /*This is a comment*/
          SELECT /* This is the Field*/names
          FROM /*This is the Table*/test 
          WHERE /*This is the variable*/names =:$name_p
          INTO :/*result*/$vresult
       /*End*/
END SQL
C_TEXT(statement)

statement:="/*This is a comment*/ "
statement:=statement + "SELECT/* This is the Field*/names "
statement:=statement +  "FROM/*This is the Table*/test "
statement:=statement + "WHERE /*This is the variable*/names =:$name_p "
statement:=statement + "INTO/*This is the result*/ :$vresult "
statement:=statement + " /*End*/"

BEGIN SQL
        execute immediate :statement;
END SQL