Right() in Subquery
Is it possible to use Right() in a subquery? If so, how is it done? The following attempt at writing the query does not work...
This does NOT work:
select *,
(select user_type_description from user_types where user_type_id LIKE 'right(uts.user_type_id, 2)%' and user_type_description LIKE '%(Header)') as col
from users_types uts, user_types ut
where uts.user_type_id *= ut.user_type_id
and uts.edcom_id = 592
order by uts.display_order asc
This does work though:
select *,
(select user_type_description from user_types where user_type_id LIKE '11%' and user_type_description LIKE '%(Header)') as col
from users_types uts, user_types ut
where uts.user_type_id *= ut.user_type_id
and uts.edcom_id =592
order by uts.display_order asc
Thank you for the help
