I would like to decide Inner or outer join ( to the same table) depending on the value. How do I do this? Thanks
I have all my select values here Then bunch of joins And on the last join I would like to do
CASE
WHEN RTRIM(LTRIM(@AccountType)) = 'OFX' THEN
INNER JOIN Subscriber.Access.SubscriberOFXAccount ASOA
ON SSA.Id = ASOA.SubscriberOFXAccountId AND ASOA.Active = 1
ELSE
LEFT JOIN Subscriber.Access.SubscriberOFXAccount ASOA2
ON SSA.Id = ASOA2.SubscriberOFXAccountId