• I'm not really familiar with accessing MySQL from a linked server, but I'd suggest converting the @advisor to a compatible data type when passing it to sp_ExecuteSql