SQLRPGLE – problem with the like while using the wild card

755 pts.
Tags:
AS/400
AS/400 Screen
SQLRPGLE
Hi all, I need your help in the Wild card search in SQLRPGLE. I'm entering the %XAS% in the display file screen field  and now based on the scan if I come across the field is with Wild card, I will use the like :Searchname in the SQLRPGLE code.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

in your SQL you want to set it up something like this.

This is how we do a wildcard search on purchase order#.

WHERE OHSPO# LIKE '%' concat Trim(:INPO) concat '%'

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ravula
    My SQL code is like this

    Declare cur1 cursor for 
    select A,B,C,D from ABC where A =  ' '  and B = :O#CHC and C like :O#SCS

    O#CHC and O#SCS are screen fields and in the O#SCS i am entering the %XAS%


    755 pointsBadges:
    report
  • ravula
    Hi Michael Tidmarsh,

    Thanks for your Answer, i will be inputing the Field of display file with the %XEU% - so display file field will have this .

    after that how to handle this 
    755 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: