New features added to SQL Prompt Watch now.

Update without where warning

eklein@ahd.com[email protected] Posts: 16 Bronze 2
edited June 28, 2016 8:18AM in SQL Prompt
While I like the intent of the warning of update/delete without a where clause, I find myself having frequent issues with code like the following :
UPDATE [wk_srv]
SET  [surg_disch_mc]=u.surg_disch_mc
FROM         medpar_srv2 u INNER JOIN
                      wk_srv s
    ON u.MEDICARE_PROVIDER_NUMBER = s.provid

I consider an inner join to be equivelent to a where statement with the parms of the ON clause

In fact if I add
Where u.MEDICARE_PROVIDER_NUMBER = s.provid
to the query, the warning goes away.

Could you consider adding a option (ie check box defaulted to off) to suppress warning on inner join
I worry if the redundant where clause adds overhead to processing the query but I don't want to turn off checking completely

Regardless of your response, thank you for a great product which continue to improve with each release

Comments

  • Ali DAli D Posts: 56 New member
    Hi
    We’re glad to hear that you’re enjoying using SQL Prompt :D

    This is a great feature suggestion and we intend to start work on implementing it soon.

    We have a similar idea on our UserVoice page, if you vote on it you’ll be notified when we’ve released a new version with this feature in it.

    Thanks
    Ali
Sign In or Register to comment.