I flubbed that one. Should be like this:

where (:ChristianName<>' ' and ChristianName=:ChristianName)
or (:Surname<>' ' and Surname=:Surname)




From: Darren Strong/DEKKO
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date: 11/12/2009 01:46 PM
Subject: RE: Load a subfile with clients selected by user


I've also used something like this, as an alternative to the 'between'
clause. Don't forget that you can compare values of host variables to
constants, to make application decisions in query.

where :ChristianName<>' ' and ChristianName=:ChristianName
and :Surname<>' ' and Surname=:Surname


Rob wrote snippet:
exec sql
Declare C1 cursor for
select ...
from ...
where ChristianName between :ChristianNameL
and :Christiannameh
and Surname between :SurnameL
and :SurnameH
...






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.