Is there an option in SQL Prompt Styles to format the Merge statements
DominicV
Posts: 2 New member
in SQL Prompt
Is there an option in SQL Prompt Styles to format the Merge statements like below:
From:
From:
MERGE dbo.TableName AS TARGET
USING
(
SELECT
@ScheduleId ScheduleId,
@AgreementID AgreementID
) AS SOURCE
ON (TARGET.ID = SOURCE.ScheduleId)
WHEN MATCHED THEN UPDATE SET
TARGET.AgreementID = SOURCE.AgreementID,
TARGET.ScheduleName = SOURCE.ScheduleName
WHEN NOT MATCHED BY TARGET THEN
INSERT
(
AgreementID,
ScheduleName
)
VALUES
(
SOURCE.AgreementID,
SOURCE.ScheduleName
);
TO:
TO:
MERGE dbo.TableName AS TARGET
USING
(
SELECT
@ScheduleId ScheduleId,
@AgreementID AgreementID
) AS SOURCE
ON (TARGET.ID = SOURCE.ScheduleId)
WHEN MATCHED
THEN UPDATE SET
THEN UPDATE SET
TARGET.AgreementID = SOURCE.AgreementID,
TARGET.ScheduleName = SOURCE.ScheduleName
WHEN NOT MATCHED BY TARGET
THEN INSERT
(
AgreementID,
ScheduleName
)
VALUES
(
SOURCE.AgreementID,
SOURCE.ScheduleName
);
Answers
then
, would be nice.