When I create or edit queries using design view, SSMS keeps creating aliases (TableName_1) for some tables for no apparent reason. More annoying is it will also do this if I open existing queries in design view. In other words, it changes my SQL code! Even simple queries have this issue, for example:
SELECT
dbo.tblCalendar.id,
dbo.tblCalendar.title,
dbo.luCalendarType.typeName
FROM
dbo.luCalendarType RIGHT OUTER JOIN
dbo.tblCalendar ON dbo.luCalendarType.id = dbo.tblCalendar.type
will be become:
SELECT
dbo.tblCalendar.id,
dbo.tblCalendar.title,
luCalendarType_1.typeName
FROM
dbo.luCalendarType AS luCalendarType_1 RIGHT OUTER JOIN
dbo.tblCalendar ON luCalendarType_1.id = dbo.tblCalendar.type
Is there any way to stop SSMS altering my SQL code?