Formatting an UPDATE query with multiple items in SET phrase
RTSJohn
Posts: 7 Bronze 1
in SQL Prompt
I'm getting the error below when trying to format a properly-formed UPDATE query that uses a join and then updates more than one column in the SET phrase. This happens even though the query parses and runs without error, and happens on multiple queries similar to this involving all different kinds of tables and joins.
I'm in SSMS 18.3.1 and SQL Prompt 9.5.22.12050. It did this on the previous release of SQL Prompt as well.
Query looks like this:
I'm in SSMS 18.3.1 and SQL Prompt 9.5.22.12050. It did this on the previous release of SQL Prompt as well.
Query looks like this:
UPDATE P SET
CompanyID = Rq.newRiskID,
ProductID = rq.newProductID
FROM #RiskQuotes AS rq
INNER JOIN dbo.Policy P ON Rq.QuoteID = P.QuoteID
WHERE Rq.newProductID IS NOT NULL
Tagged:
Answers
Can you share your format style file since it doesn't error with the default one for me?
Thanks.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Could you export your Prompt options (SQL Prompt ->Options->Export) and attach to your reply?
Thanks.
Tianjiao Li | Redgate Software
Have you visited our Help Center?