What's the value of SQLCOD and SQLERRMC SQLERRMC will likely tell you
where the problem exists.
Bob Evans Farms, Inc.
Bob Evans Bob-B-Q: You haven't had barbeque until you've had Bob Evans
Bob-B-Q. Try our six Bob-B-Q dishes, starting at $5.99. For more
information, visit www.BobEvans.com.
midrange-l-bounces@xxxxxxxxxxxx wrote on 07/30/2008 10:14:35 AM:
sorry about the bad post before
this is the rpg code that executes the sql statements below
SQ is the create table string below
Dsq S 800a
C+ PREPARE DYNSLT FROM :SQ
C IF SQLSTT = '00000'
C+ EXECUTE DYNSLT
when SQ = this it works just fine
CREATE TABLE TST/TESTJJ AS (SELECT AHAPDL, AHAPNO, AHBSNO, A
HBSDT, AHBQTY FROM CAT/AH WHERE (AHAPDL IN ('106','425','
426')) AND (AHPNO LIKE 'LABOR%') AND (AHXCTYPE = '1')) WITH
when SQ = this it returns an sqlstt of 42908
CREATE TABLE TST/TESTJJ AS (SELECT ahaPDL, AHAPNO, AHBSNO, aHBSDT,
sum(AHXLABHR) FROM cat/ah WHERE (ahapdl in ('106','425','426')) and
'LABOR%') and (ahxctype = '1') GROUP BY ahaPDL, AHAPNO, AHBSNO,
aHBSDT, AHBQTY ORDER BY ahaPDL, AHAPNO, AHBSNO, aHBSDT, AHBQTY )
the only difference I can see are the group by and order by clauses.
This email is intended only for the person or entity
to which it is addressed and may contain information
that is privileged, confidential or otherwise protected
from disclosure. If you are not the named addressee
or an employee or agent responsible for delivering
this message to the named addressee, you are not
authorized to read, print, retain copy, and disseminate
this message or any part of it. If you have received this
message in error please notify us immediately by email,
discard any paper copies and delete all electronic files
of this message.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives