Select distinct '1' into :indicator
Software Engineer - PLM Development Team
Philips Consumer Luminaires
Tel: (+32) 3/459 13 17
Fax: (+32) 3/450 74 33
Address: Industrieterrein Satenrozen 11, 2550 Kontich, Belgium
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dave
Sent: dinsdag 24 april 2012 16:48
To: RPG programming on the IBM i / System i
Subject: sqlrpgle question
I want to set the value of an indicator to *on if I find at least one record matching my search criteria and *off otherwise.
What's the best way?
indicator = *off;
Select '1' into : indicator
where ....err.. what goes here? what if there are many rows returned?
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.