I would like to be able to use a prepared statement as follows:
select *
from PAYPAL0
where plemail
like '%' concat cast(trim(?) as varchar(52)) concat '%'
I can get the statement to run in SQL using STRSQL but when I embed it into my RPG program I get the following error.
Message ID . . . . . . : SQL0418 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 10/03/16 Time sent . . . . . . : 08:07:14
Message . . . . : Use of parameter marker or NULL not valid.
Cause . . . . . : Parameter markers and NULL are not allowed:
Thoughts??
select *
from PAYPAL0
where plemail
like '%' concat cast(trim(?) as varchar(52)) concat '%'
I can get the statement to run in SQL using STRSQL but when I embed it into my RPG program I get the following error.
Message ID . . . . . . : SQL0418 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 10/03/16 Time sent . . . . . . : 08:07:14
Message . . . . : Use of parameter marker or NULL not valid.
Cause . . . . . : Parameter markers and NULL are not allowed:
Thoughts??



Comment