Hi,
I think your mytable contains more than 1 records and you are trying to use a row operator function to put data into single value variable. This is not allowed as multiple ROW data cannot be put into single value variable.
You can either use a cursor and loop through all the records and add the value to 'list' or declare a table type to store the data.
Regards,
Ravi