Hi,
I cant quite work out how to add a variable into a SELECT query.
My attempt is
Thanks in advance for any assistance
Todd
I cant quite work out how to add a variable into a SELECT query.
My attempt is
query = ("SELECT distinctrow UPC, ItemFriendlyNames, ItemName, Brand, Model, Retailer, ItemID FROM my.view where ItemFriendlyNames like "%(pSearch)%" order by UPC, Model, Retailer")
data = (event['pSearch'],)
cursor.execute(query,data)
rows = cursor.fetchall()I have a field called pSearch that contains the user input. In addition I want to use like and add %% to each end of the user input.Thanks in advance for any assistance
Todd
