Wildcard characters in Prepared statement

I need to convert a SQL statement to a Prepared statement and am a bit confused on the structure. Here’s the original SQL:

SELECT Type, ID, Name FROM Models WHERE upper(Name) LIKE '%RA%'

The ‘RA’ is coming from a use input text field. My question is how do I structure the statement to allow for the two wildcard characters?

The code is currently in 2019r1.1 (and is likely to remain there) on Windows 10.

SELECT Type, ID, Name FROM Models WHERE upper(Name) LIKE ?

Call the command with the value including the wildcards like this:

rs = SelectSQL(sql, "%RA%")
1 Like

[quote=473569:@Paul Lefebvre]SELECT Type, ID, Name FROM Models WHERE upper(Name) LIKE ?

Call the command with the value including the wildcards like this:

rs = SelectSQL(sql, "%RA%")

Thanks, Paul. That did it.