Is the statement too long for the source member? Does it run into a comment portion of the line? Thus, resulting in part of it being truncated at runtime?
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Wednesday, October 06, 2010 1:26 PM
To: Midrange Systems Technical Discussion
Subject: RE: Statement gives error in RUNSQLSTM
The previous statement does end with an error but it is only severity 20
telling me the table was created but no journaled. I have 7 create table
statements and they all finish with this error, but the runsqlstm doesn't
choke on them.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
"Morgan, Paul" <Paul.Morgan@xxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/06/2010 02:03 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc
Subject
RE: Statement gives error in RUNSQLSTM
Bryce,
Try running it in a source by itself and see if it gets an error. I'd bet
the create table statement in front of it is the statement in error
(semicolon or no semicolon).
Paul
Principal Programmer Analyst
IS Supply Chain/Replenishment
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Wednesday, October 06, 2010 1:23 PM
To: Midrange Systems Technical Discussion
Subject: Re: Statement gives error in RUNSQLSTM
It is not the only statement in the source but all the previous statements
have semicolons. I tried wrapping the select in parens and got the same
error.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Vern Hamberg <vhamberg@xxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/06/2010 12:55 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc
Subject
Re: Statement gives error in RUNSQLSTM
Bryce
Is this the only statement in the source? Is there a semicolon missing
from a preceding statement?
And does the SELECT need to be wrapped in parentheses?
Vern
On 10/6/2010 10:41 AM, Bryce Martin wrote:
This statement gives an error in RUNSQLSTM but runs fine from an
interactive sql tool.
INSERT INTO BMDATA/RCM#NAME (K, V) SELECT TRIM(CNME), CCUST FROM
BPCSFFG/RCM WHERE CMID = 'CM' AND CNME NOT LIKE '**%';
Here is the error...
SQL0199 30 9 Position 8 Keyword INTO not expected. Valid tokens:
FOR
WITH FETCH ORDER UNION EXCEPT OPTIMIZE.
It has not been a good SQL day so far for me.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the
use of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---
As an Amazon Associate we earn from qualifying purchases.