I'm fairly new using SQL Queries. The query below works fine until I add the last line "and mail6.folder like 'X-GM%'". I'm guessing that I'm not using "and" correctly and thus it is not seeing the additional variable. Any help would be appreciated. Thanks!
select *
from gm6.dbo.mailbox as mail6
left join goldmine8.dbo.mailbox as mail8
on (coalesce(mail6.recid,'') <> coalesce(mail8.recid, ' '))
and mail6.folder like 'X-GM%'
select *
from gm6.dbo.mailbox as mail6
left join goldmine8.dbo.mailbox as mail8
on (coalesce(mail6.recid,'') <> coalesce(mail8.recid, ' '))
and mail6.folder like 'X-GM%'