November 19, 2014 at 1:22 pm
If we need to do it in our office and giving that the code here doesn't have any formatting standards and is a PITA to read, I would generate scripts for all procedures, triggers, functions and views and run a formatting tool that adds the semicolon (I'd be killing two birds with one stone). I know that ApexSQL Refactor does that, but I'm sure that other tools can do the work as well.
Of course, you need to review the options and be careful to prevent breaking something, but it can help.
November 20, 2014 at 9:12 am
Luis Cazares (11/19/2014)
If we need to do it in our office and giving that the code here doesn't have any formatting standards and is a PITA to read, I would generate scripts for all procedures, triggers, functions and views and run a formatting tool that adds the semicolon (I'd be killing two birds with one stone). I know that ApexSQL Refactor does that, but I'm sure that other tools can do the work as well.Of course, you need to review the options and be careful to prevent breaking something, but it can help.
Well, luckily in our environment we can spawn off copies of production in a relatively short amount of time, so that might be the way to go... basically make a copy, format everything, and then see what happens.
November 20, 2014 at 2:11 pm
Luis Cazares (11/19/2014)
I know that ApexSQL Refactor does that, but I'm sure that other tools can do the work as well.
Latest version of SQL prompt can do that too. It's not perfect, at least the beta once put a ; in the wrong place, maybe that bug was fixed. It's a help, but it's not going to do the work for you.
cphite: Want to swap places? My company has lots of small systems written for clients, none of which are any of my responsibility, plus I have a small number clients that I do SQL work for (tuning mostly). When this becomes mandatory (if I'm still working there), I'll have the pleasure of doing the upgrade testing and fixing everything that's broken (as I'm doing for 4 servers next year for SQL 2014 upgrades). At that point I'll have to add the ; to probably 30+ systems that I've never seen before.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 20, 2014 at 3:26 pm
GilaMonster (11/20/2014)
Luis Cazares (11/19/2014)
I know that ApexSQL Refactor does that, but I'm sure that other tools can do the work as well.Latest version of SQL prompt can do that too. It's not perfect, at least the beta once put a ; in the wrong place, maybe that bug was fixed. It's a help, but it's not going to do the work for you.
cphite: Want to swap places? My company has lots of small systems written for clients, none of which are any of my responsibility, plus I have a small number clients that I do SQL work for (tuning mostly). When this becomes mandatory (if I'm still working there), I'll have the pleasure of doing the upgrade testing and fixing everything that's broken (as I'm doing for 4 servers next year for SQL 2014 upgrades). At that point I'll have to add the ; to probably 30+ systems that I've never seen before.
Oh, I've been there... I think I'll stick with my own overblown systems, thanks anyway 🙂
On the bright side, I may be able to leverage this into a reason to actually get rid of a whole lot of bad code that's left from the previous administration... I've already stamped out a lot over the past few years, this will be incentive to do the rest.
November 21, 2014 at 7:54 am
Koen Verbeeck (11/19/2014)
12 in 14 scientific studies prove the fact that you can make any claim, as long as you use precise numbers. 😀
From the illustrious Mr. Celko:
"I have Mother Celko's Law of Decimal Places: 'A statistic or measurement impresses the reader to the square of the decimal places.' This a means that telling your non-techie manager that the average weight of a floobsnizzle is 23 kilograms is not as impressive as telling him the average weight of a floobsnizzle is 23.12 kilograms. " ("Data is Crazier Than You Think" over on Simple Talk)
We now return you to your regularly scheduled discussion...
____________
Just my $0.02 from over here in the cheap seats of the peanut gallery - please adjust for inflation and/or your local currency.
Viewing 5 posts - 31 through 34 (of 34 total)
You must be logged in to reply to this topic. Login to reply