3

私は IBM iseries v6r1m0 システムに取り組んでいます。

私は非常に単純なクエリを実行しようとしています:

select * from XG.ART where DOS = 998 and (DES like 'ALB%' or DESABR like 'ALB%')

列は次のとおりです。

DOS -> numeric (3,0)
DES -> Graphic(80) CCSID 1200
DESABR -> Garphic(25) CCSID 1200

私は得る:

SQL State : 58004
SQL Code : -901
Message : [SQL0901] SQL System error. 
Cause . . . . . :  An SQL system error has occurred. The current SQL statement cannot be completed successfully. The error will not prevent other SQL statements from being processed. Previous messages may indicate that there is a problem with the SQL statement and SQL did not correctly diagnose the error. The previous message identifier was CPF4204. Internal error type 3107 has occurred. If precompiling, processing will not continue beyond this statement.
Recovery . . . : See the previous messages to determine if there is a problem with the SQL statement. To view the messages, use the DSPJOBLOG command if running interactively, or the WRKJOB command to view the output of a precompile. An application program receiving this return code may attempt further SQL statements. Correct any errors and try the request again.

DES を REF (graphic(25)) に変更すると、動作します...

編集 :

今日の午後、いくつかのテストを実行しましたが、非常に奇妙です:

テーブル/インデックスの作成直後、エラーはありません。

  • いくつかのデータを挿入すると:エラー
  • テーブルをクリアすると:エラー
  • インデックスを削除すると(以下を参照):動作します(データの有無にかかわらず)!!

インデックスは次のとおりです。

create index XG.GTFAT_ART_B on XG.ART(
DOS,
DESABR,
ART_ID
)

編集2:

これがジョブログです(申し訳ありませんが、フランス語です...) ジョブログ

それは言う:

Function error X'1720' in machine instruction. Internal snapshot ID 01010054
Foo file created in library QTEMP.
*** stuff with the printer
DBOP *** FAILED open. Exception from call to SLIC$
Internal error in the query processor file
Sql system error
4

4 に答える 4

2

最後にIBMに連絡しました。

これは v5 からの古いバグでした。

最新の PTF をインストールしたところ、動作するようになりました。

于 2012-07-12T17:38:48.260 に答える
0

LIKE述部で文字リテラルを変換するには、 GRAPHICスカラー関数を使用する必要があります。

CREATE TABLE QTEMP/TEST (F1 GRAPHIC(80))
INSERT INTO QTEMP/TEST (F1) VALUES (GRAPHIC('TEST'))
SELECT * FROM QTEMP/TEST WHERE F1 LIKE GRAPHIC('TE%')
于 2012-06-26T02:59:58.700 に答える