× 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.



Actually Peter's example of

C+ SELECT SUM(ILQTY) AS "SQLQT1", SUM(ILQTY * ILNET)
AS "SQLSL1" into :sqlqt1, :SQLSL1 

Could be shortened into
C+ SELECT SUM(ILQTY), SUM(ILQTY * ILNET)
C+ into :sqlqt1, :SQLSL1 

Since the 'as' stuff is not buying you anything in this example.  It's not 
like you are running this SQL from STRSQL and want the column heading to 
say "SQLQT1" instead of some generated column name.  Or, using a temp 
table like

C+ with temptable as
C+ (SELECT SUM(ILQTY) AS "SQLQT1",
C+         SUM(ILQTY * ILNET) AS "SQLSL1"
C+  FROM SIH, SIL 
C+ WHERE (SIINVN = ILINVN) and (SICUST = :CUSNBR) and
C+       (ILPROD = :ITMNBR)
C+       and (SIINVD BETWEEN 20050701 and 20050731) 
C+ )
C+ Select temptable.sqlqt1, temptable.sqlsl1
C+ into :sqlqt1, :sqlsl1
C+ from temptable
 


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.