SELECT a.[IdForcedAppointmentType],
a.[ForcedAppointmentTypeTitle],
b.[type],
b.[allow]
FROM [calendars].[dbo].[ForcedAppointmentTypes] AS a
LEFT OUTER JOIN [calendars].[dbo].[Preference_exchange] AS b
ON a.[IdForcedAppointmentType] = b.[type] AND b.[uid] = ''Add a code snippet to your website: www.paste.org