07-31-2023, 09:32 AM
This may sound silly and seems obvious from the name SessionGUID, but is the column a uniqueidentifier on Report_Opener? If not, you may want to try casting it to the correct type and give it a shot or declare your variable to the correct type.
The plan created as part of the sproc may work unintuitively and do an internal cast on a large table.
The plan created as part of the sproc may work unintuitively and do an internal cast on a large table.