×

Good News Everybody!

A new search engine is coming soon.

As a stop gap measure, we are using Google's custom search engine service.




I'm thinking that sql doesn't know about the rpg variable  parm (since the op coded it is as host variable).

So I think  the code would have to be

If parm = '1';

  select column1, column2

      into :hostvar1, :hostvar2

Else;

  select column1, column2

      into :hostvar3, :hostvar4

Endif;

Rob

On 2/27/2019 2:39 PM, Jay Vaughn wrote:
what is the proper method/syntax (if any) to allow something like the
following...?


select column1
,column2
into...
case when :parm = '1'
then :hostvar1
,:hostvar2
else :hostvar3
,:hostvar4
end
from mytable
where this = that;

tia,

jay

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-2026 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.