I know that I cannot use a wildcard in a MySQL replace query but I need some kind of workaround, or a better way of getting my results. I basically want to return an empty value if field starts with a string.
This is what I would use if it accepted a wildcard
SET @initials := 'appear)","value":"';
SET @EndC := '",';
SELECT
REPLACE (SUBSTRING_INDEX(SUBSTRING_INDEX(sales_order_item.product_options,@initials,-1),@EndC,1), '{"info_buyRequest%','') AS 'Initials'
FROM
sales_order_grid