Forum Discussion

testBench's avatar
testBench
New Member
9 months ago

JDBC Request/Query for value located within data BLOB

I am attempting to execute the following query within a ReadyAPI JDBC request 
SELECT * 
FROM consumer
WHERE consumer.payload LIKE '%name%'

The issue is that ReadyAPI treats the '%' as part of the literal string which from what I understand is a sort of wildcard and used to match the given name exactly so instead of just using name it uses %name% and then returns null

Within Oracle SQL Developer the query executes just fine and returns the expected corresponding row(s) but when attempting to execute it within ReadyAPI JDBC request i get null. How exactly do I go about writing the query in ReadyAPI to treat the '%' as a sort of wildcard and not actually part of the string/value?

  • nmrao's avatar
    nmrao
    Champion Level 3

    Can you please check if below helps?

    SELECT * 
    FROM consumer
    WHERE consumer.payload LIKE '%%name%%'
    

    Also see if you can use property expansion