|
All:
I am writing a quickie program to correct monthly
sales totals. I need to use SQL to perform the
select & sum of the monthly total from a Sales Invoice
Header & Detail file. When I compile
the source, I get the error message: Position 9 INTO
clause missing from embedded statement.
My embedded SQL:
C/EXEC SQL
C+ SELECT SUM(ILQTY) AS "SQLQT1", SUM(ILQTY * ILNET)
AS "SQLSL1"
C+ FROM SIH, SIL
C+ WHERE (SIINVN = ILINVN) and (SICUST = :CUSNBR) and
(ILPROD = :ITMNBR)
C+ and (SIINVD BETWEEN 20050701 and 20050731)
C/END-EXEC
I am also unsure if I need to specify the SQLQT1 and
SQLSL1 in quotes as listed,
or use :SQLQT1 and :SQLSL1 as is normal per RPG
defined variables in embedded SQL.
Thanks in Advance
Kevin Elliott
Business Analyst
Gilchrist & Soames
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.