Bernie,

This isn't going to work with a where clause...

> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Bernard Lis
> Sent: Tuesday, July 05, 2005 1:47 PM
> To: RBG7-L Mailing List
> Subject: [RBG7-L] - Select Max question
> 
> set var MaxPaymentNo int=null
> SELECT MAX(PaymentNo) INTO MaxPaymentNo IND iv1  FROM PAYMENTS WHERE
> OrderNo
> = 9596096
> 
> sqlcode returns 0 even though the record does not exist.
> MaxPaymentNo becomes 0  and the indicator iv1 is also 0
> 
> Is this the way it's supposed to be?
> 
> Bernie Lis

Reply via email to