× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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/EXEC SQL
C+ PREPARE DYNSLT FROM :SQ
C/END-EXEC

C IF SQLSTT = '00000'
C/EXEC SQL
C+ EXECUTE DYNSLT
C/END-EXEC
C ENDIF

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
DATA

when SQ = this it returns an sqlstt of 42908
CREATE TABLE TST/TESTJJ AS (SELECT ahaPDL, AHAPNO, AHBSNO, aHBSDT,
AHBQTY,
sum(AHXLABHR) FROM cat/ah WHERE (ahapdl in ('106','425','426')) and
(ahpno LIKE
'LABOR%') and (ahxctype = '1') GROUP BY ahaPDL, AHAPNO, AHBSNO,
aHBSDT, AHBQTY ORDER BY ahaPDL, AHAPNO, AHBSNO, aHBSDT, AHBQTY )
WITH DATA

the only difference I can see are the group by and order by clauses.

thanks

Jim Horn

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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.