|
Robert would something like this work for you.... Below is a where clause using case statements. Where FirstName = CASE WHEN :FName <> ' ' THEN :FName ELSE FirstName END And LastName = CASE WHEN :LName <> ' ' THEN :LName ELSE LastName END rpg400-l-bounces@xxxxxxxxxxxx wrote on 08/08/2006 03:11:54 PM:
I am attempting to use a PREPARE statement within embedded-SQL to get records based upon a number of varied user input selections. I have coded the program using local program examples and two books, yet I get no records and the program ends immediately. I do get SQLCOD -312 and SQLCOD -514 saying that the program cannot find either my PREPARE statement or the variable used within that statement. I don't want to have to code eight cursors and processing for eight conditions. Creating one cursor and one PREPARE statement would work wonders. If you are proficient in PREPARE statements within embedded-SQL, I could use some major league help. Please contact me offline at RWMunday@xxxxxxxxxxxxx . I can provide program code for your review. Thanks, Robert Munday Munday Software Consultants Montgomery, AL on assignment in Dublin, OH -- 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 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.