fabulous... thanks!
 
 
 
 
 
Thanks,
 
 
Jay Vaughn
iSeries Senior Programmer/Analyst
RateWatch
jayv@xxxxxxxxxxxxxx
251-633-8929


-----Original Message-----
From: "DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Date: Mon, 20 Nov 2006 09:35:22 -0600
Subject: RE: CHECK A LIST OF LITERALS IN SQL


Jay,

In your Select clause, you are specifying two return fields, and are not 
using any aggregation functions.  In this case, I think you should just 
remove the GROUP BY clause.  If you choose to not remove the GROUP BY, then 
just add the second field (QDRATE) to your group by list.

hth,
Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jay Vaughn
Sent: Monday, November 20, 2006 9:03 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: CHECK A LIST OF LITERALS IN SQL


THANKS ALAN!

Now I am getting the following sql compile error and have no idea why... can 

you shed some light?

351  C/exec sql                                                           
352  C+ DECLARE R1CSR CURSOR FOR SELECT QHCITY, QDRATE FROM BRDETAIL JOIN 
353  C+ BANKHEDR ON QDSTCD=QHSTCD AND QDAREA=QHAREA AND QDBANK=QHBANK AND 
354  C+ QDDGRP=QHHGRP WHERE QDSTCD = :@STATE AND QDSDT >= :WKDATE AND     
355  C+ QDINST IN ('03MCD10K', '06MCD10K', '12MCD10K', '18MCD10K',        
356  C+ '24MCD10K', '30MCD10K', '36MCD10K', '48MCD10K', '60MCD10K') GROUP 
357  C+ BY QHCITY ORDER BY QDRATE ASC                                     
358  C/end-exec                                                           

MSG ID  SEV  RECORD  TEXT                                                   
SQL0122  30     352  Position 49 Column QDRATE or expression in SELECT list 
                     not valid.                                             
 
 
 
 
 
Thanks,
 
 
Jay Vaughn
iSeries Senior Programmer/Analyst
RateWatch
jayv@xxxxxxxxxxxxxx
251-633-8929


-----Original Message-----
From: Alan Shore <AlanShore@xxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date: Thu, 16 Nov 2006 16:03:52 -0500
Subject: Re: CHECK A LIST OF LITERALS IN SQL


That would be the IN predicate
for example
SELECT CUSTID, NAME FROM CUSTOMER WHERE CUSTSTATE IN ('NY', 'NJ','PA')

OR
SELECT CUSTID, NAME FROM CUSTOMER WHERE CUSTSTATE IN (SELECT STATE FROM
WAREHOUSE)



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
rpg400-l-bounces@xxxxxxxxxxxx wrote on 11/16/2006 03:46:40 PM:

I want to check for a list of literals in a variable,  just like you
would
with the LIST in query400...

how do you do that?





Thanks,


Jay Vaughn
iSeries Senior Programmer/Analyst
RateWatch
jayv@xxxxxxxxxxxxxx
251-633-8929
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.