I need to run a query that returns the results of a subquery as varchar or text based column in my query. I have tried the following but get the error
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
CAST((select smtp_recipient from email_smtp_recipient em
where r.rn_appointments_id = em.schedule_email_id) as varchar(8000))
from rn_appointments r
where r.rn_appointments_id = '0FE9F3'
How do I do this? Thanks!!