June 13, 2019 at 2:58 pm
While it's not my job to judge, I do "follow" you on these forums for a reason... you're posts over the last more than a decade have always been helpful and you've always been thoughtful in your responses. You, sir, actually are an "Exceptional DBA" (and exceptional person) and I appreciate every one of your posts.
Thanks Jeff that means a lot coming from you
I feel really humble 🙂
Far away is close at hand in the images of elsewhere.
Anon.
June 13, 2019 at 5:40 pm
I generally use the SQLinForm plugin for Notepad++, works fine for large code sets and most SQL flavors. 😎
With some settings changes, that actually does a fairly good job with the "River Format" is spoke of.
You've got to be damned careful with such formatters, though... here's a snippet of the code I tried on the formatter. Note the <<Cmd>> notations...
SELECT REPLACE(REPLACE('
PRINT "<<Cmd>>";
EXEC ("<<Cmd>>");
GO'
,'"','''')
,'<<Cmd>>',CMD)
FROM cteCmd
ORDER BY [Rows]
;
While the formatter does give a warning about carriage returns in some of the comments, it provides absolutely no warning of what it did in the strings. Here's what it did to that snippet of code, which seriously breaks the code. Why in the hell would they change a string literal?
SELECT REPLACE(REPLACE('
PRINT "<>";
EXEC ("<>");
GO' ,'"','''') ,'<>',CMD)
FROM cteCmd
ORDER BY [Rows]
;
--Jeff Moden
Change is inevitable... Change for the better is not.
June 14, 2019 at 11:51 pm
Hmmph... additionally, the "Free" online version is limited to 100 lines of code. The non-free versions aren't expensive but, considering the bug I found above, I wouldn't spend a nickle on it. A lot of formatters fall into the same category.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 46 through 47 (of 47 total)
You must be logged in to reply to this topic. Login to reply