T. Laza
T. Laza

Reputation: 11

Comment causes error in run sql scripts

I am using Run SQL Scripts in System i Navigator with a query like the following.

-- Comment
WITH Q1 AS (
SELECT * FROM TESTSTEC.IVPTURNS1F
WHERE TTURNS > 0
)
SELECT * FROM Q1

This generates the following error.

MCH1210: Receiver value too small to hold result.

SQL State: 58004 Vendor Code: -901

The query shown above is just an simple example to demonstrate the error. If I take out the comment or place it after the query, the query runs without any problems. Has anyone seen this behavior before or have any idea how to remedy it?

Upvotes: 1

Views: 477

Answers (1)

hancockm
hancockm

Reputation: 46

A comment in iseries-navigator uses /*

You are using a T-SQL version of commenting not the IBMi version:

/* Comment */
WITH Q1 AS (
  SELECT * FROM TESTSTEC.IVPTURNS1F
  WHERE TTURNS > 0
)
SELECT * FROM Q1

Upvotes: 0

Related Questions